pub struct PartitionIoProxy { /* private fields */ }Implementations§
Source§impl PartitionIoProxy
impl PartitionIoProxy
Sourcepub fn take_event_stream(&self) -> PartitionIoEventStream
pub fn take_event_stream(&self) -> PartitionIoEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_partition_size(
&self,
partition: &str,
) -> QueryResponseFut<PartitionIoGetPartitionSizeResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_partition_size( &self, partition: &str, ) -> QueryResponseFut<PartitionIoGetPartitionSizeResult, DefaultFuchsiaResourceDialect> ⓘ
Returns the size in bytes of a raw partition by name.
Sourcepub fn read_partition(
&self,
partition: &str,
offset: u64,
size: u64,
) -> QueryResponseFut<PartitionIoReadPartitionResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn read_partition( &self, partition: &str, offset: u64, size: u64, ) -> QueryResponseFut<PartitionIoReadPartitionResult, DefaultFuchsiaResourceDialect> ⓘ
Reads size bytes from a raw partition by name starting at offset.
Both offset and size may be arbitrary byte values and do not need to be aligned to the
partition’s block size. The ZX_PROP_VMO_CONTENT_SIZE property on the returned payload
VMO will be set to size.
Returns ZX_ERR_INVALID_ARGS if size is 0, or ZX_ERR_OUT_OF_RANGE if offset + size
exceeds the partition size.
Sourcepub fn write_partition(
&self,
partition: &str,
offset: u64,
payload: Vmo,
trailing: TrailingBehavior,
) -> QueryResponseFut<PartitionIoWritePartitionResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn write_partition( &self, partition: &str, offset: u64, payload: Vmo, trailing: TrailingBehavior, ) -> QueryResponseFut<PartitionIoWritePartitionResult, DefaultFuchsiaResourceDialect> ⓘ
Writes payload to a raw partition by name starting at offset.
The number of bytes to write is read from the ZX_PROP_VMO_CONTENT_SIZE property of
payload. Both offset and the write size may be arbitrary byte values and do not need to
be aligned to the partition’s block size.
Any leading partial block (when offset is not block-aligned) is always updated via
read-modify-write to preserve existing bytes prior to offset. Behavior for partition
contents after offset + size is controlled by trailing.
On some platforms, written data may be buffered in memory and is not guaranteed to be
persisted to storage until Flush is called.
Returns ZX_ERR_OUT_OF_RANGE if offset + size exceeds the partition size.
Sourcepub fn flush(
&self,
) -> QueryResponseFut<PartitionIoFlushResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn flush( &self, ) -> QueryResponseFut<PartitionIoFlushResult, DefaultFuchsiaResourceDialect> ⓘ
Flushes all previous WritePartition operations to persistent storage.
Callers must invoke Flush after completing partition writes to ensure that any buffered
data is persisted to storage.
Trait Implementations§
Source§impl Clone for PartitionIoProxy
impl Clone for PartitionIoProxy
Source§impl Debug for PartitionIoProxy
impl Debug for PartitionIoProxy
Source§impl PartitionIoProxyInterface for PartitionIoProxy
impl PartitionIoProxyInterface for PartitionIoProxy
type GetPartitionSizeResponseFut = QueryResponseFut<Result<u64, i32>>
type ReadPartitionResponseFut = QueryResponseFut<Result<Vmo, i32>>
type WritePartitionResponseFut = QueryResponseFut<Result<(), i32>>
type FlushResponseFut = QueryResponseFut<Result<(), i32>>
fn get_partition_size( &self, partition: &str, ) -> Self::GetPartitionSizeResponseFut
fn read_partition( &self, partition: &str, offset: u64, size: u64, ) -> Self::ReadPartitionResponseFut
fn write_partition( &self, partition: &str, offset: u64, payload: Vmo, trailing: TrailingBehavior, ) -> Self::WritePartitionResponseFut
fn flush(&self) -> Self::FlushResponseFut
Source§impl Proxy for PartitionIoProxy
impl Proxy for PartitionIoProxy
Source§type Protocol = PartitionIoMarker
type Protocol = PartitionIoMarker
Proxy controls.