pub struct PartitionProxy { /* private fields */ }
Implementations§
source§impl PartitionProxy
impl PartitionProxy
sourcepub fn take_event_stream(&self) -> PartitionEventStream
pub fn take_event_stream(&self) -> PartitionEventStream
Get a Stream of events from the remote end of the Partition protocol
Panics
Panics if the event stream was already taken.
sourcepub fn get_info(&self) -> QueryResponseFut<BlockGetInfoResult>
pub fn get_info(&self) -> QueryResponseFut<BlockGetInfoResult>
Get information about the underlying block device.
sourcepub fn get_stats(&self, clear: bool) -> QueryResponseFut<BlockGetStatsResult>
pub fn get_stats(&self, clear: bool) -> QueryResponseFut<BlockGetStatsResult>
Returns stats about the block device on the provided buffer and optionally clears the counters.
storage_metrics.CallStat.bytes_transferred is number of bytes requested to be transferred.
sourcepub fn open_session(
&self,
session: ServerEnd<SessionMarker>
) -> Result<(), Error>
pub fn open_session( &self, session: ServerEnd<SessionMarker> ) -> Result<(), Error>
Opens a new FIFO-based session on the block device.
sourcepub fn read_blocks(
&self,
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64
) -> QueryResponseFut<BlockReadBlocksResult>
pub fn read_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> QueryResponseFut<BlockReadBlocksResult>
Reads from a block device.
This read does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.
sourcepub fn write_blocks(
&self,
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64
) -> QueryResponseFut<BlockWriteBlocksResult>
pub fn write_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> QueryResponseFut<BlockWriteBlocksResult>
Writes to a block device.
This write does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.
sourcepub fn get_type_guid(&self) -> QueryResponseFut<(i32, Option<Box<Guid>>)>
pub fn get_type_guid(&self) -> QueryResponseFut<(i32, Option<Box<Guid>>)>
Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.
Trait Implementations§
source§impl Clone for PartitionProxy
impl Clone for PartitionProxy
source§fn clone(&self) -> PartitionProxy
fn clone(&self) -> PartitionProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PartitionProxy
impl Debug for PartitionProxy
source§impl PartitionProxyInterface for PartitionProxy
impl PartitionProxyInterface for PartitionProxy
type GetInfoResponseFut = QueryResponseFut<Result<BlockInfo, i32>>
fn get_info(&self) -> Self::GetInfoResponseFut
type GetStatsResponseFut = QueryResponseFut<Result<BlockStats, i32>>
fn get_stats(&self, clear: bool) -> Self::GetStatsResponseFut
fn open_session(&self, session: ServerEnd<SessionMarker>) -> Result<(), Error>
type ReadBlocksResponseFut = QueryResponseFut<Result<(), i32>>
fn read_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> Self::ReadBlocksResponseFut
type WriteBlocksResponseFut = QueryResponseFut<Result<(), i32>>
fn write_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> Self::WriteBlocksResponseFut
type GetTypeGuidResponseFut = QueryResponseFut<(i32, Option<Box<Guid, Global>>)>
fn get_type_guid(&self) -> Self::GetTypeGuidResponseFut
type GetInstanceGuidResponseFut = QueryResponseFut<(i32, Option<Box<Guid, Global>>)>
fn get_instance_guid(&self) -> Self::GetInstanceGuidResponseFut
type GetNameResponseFut = QueryResponseFut<(i32, Option<String>)>
fn get_name(&self) -> Self::GetNameResponseFut
source§impl Proxy for PartitionProxy
impl Proxy for PartitionProxy
§type Protocol = PartitionMarker
type Protocol = PartitionMarker
Proxy
controls.