pub struct PartitionIoSynchronousProxy { /* private fields */ }Implementations§
Source§impl PartitionIoSynchronousProxy
impl PartitionIoSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PartitionIoEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PartitionIoEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_partition_size(
&self,
partition: &str,
___deadline: MonotonicInstant,
) -> Result<PartitionIoGetPartitionSizeResult, Error>
pub fn get_partition_size( &self, partition: &str, ___deadline: MonotonicInstant, ) -> Result<PartitionIoGetPartitionSizeResult, Error>
Returns the size in bytes of a raw partition by name.
Sourcepub fn read_partition(
&self,
partition: &str,
offset: u64,
size: u64,
___deadline: MonotonicInstant,
) -> Result<PartitionIoReadPartitionResult, Error>
pub fn read_partition( &self, partition: &str, offset: u64, size: u64, ___deadline: MonotonicInstant, ) -> Result<PartitionIoReadPartitionResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<PartitionIoWritePartitionResult, Error>
pub fn write_partition( &self, partition: &str, offset: u64, payload: Vmo, trailing: TrailingBehavior, ___deadline: MonotonicInstant, ) -> Result<PartitionIoWritePartitionResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<PartitionIoFlushResult, Error>
pub fn flush( &self, ___deadline: MonotonicInstant, ) -> Result<PartitionIoFlushResult, Error>
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 Debug for PartitionIoSynchronousProxy
impl Debug for PartitionIoSynchronousProxy
Source§impl From<Channel> for PartitionIoSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for PartitionIoSynchronousProxy
Source§impl From<PartitionIoSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<PartitionIoSynchronousProxy> for NullableHandle
Source§fn from(value: PartitionIoSynchronousProxy) -> Self
fn from(value: PartitionIoSynchronousProxy) -> Self
Source§impl FromClient for PartitionIoSynchronousProxy
Available on Fuchsia only.
impl FromClient for PartitionIoSynchronousProxy
Source§type Protocol = PartitionIoMarker
type Protocol = PartitionIoMarker
Source§fn from_client(value: ClientEnd<PartitionIoMarker>) -> Self
fn from_client(value: ClientEnd<PartitionIoMarker>) -> Self
Source§impl SynchronousProxy for PartitionIoSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for PartitionIoSynchronousProxy
Source§type Proxy = PartitionIoProxy
type Proxy = PartitionIoProxy
Source§type Protocol = PartitionIoMarker
type Protocol = PartitionIoMarker
Proxy controls.