pub trait PartitionIoLocalServerHandler<___T: Transport = Channel> {
// Required methods
fn get_partition_size(
&mut self,
request: Request<GetPartitionSize, ___T>,
responder: Responder<GetPartitionSize, ___T>,
) -> impl Future<Output = ()>;
fn read_partition(
&mut self,
request: Request<ReadPartition, ___T>,
responder: Responder<ReadPartition, ___T>,
) -> impl Future<Output = ()>;
fn write_partition(
&mut self,
request: Request<WritePartition, ___T>,
responder: Responder<WritePartition, ___T>,
) -> impl Future<Output = ()>;
fn flush(
&mut self,
responder: Responder<Flush, ___T>,
) -> impl Future<Output = ()>;
}Expand description
A server handler for the PartitionIo protocol.
See PartitionIo for more details.
Required Methods§
Sourcefn get_partition_size(
&mut self,
request: Request<GetPartitionSize, ___T>,
responder: Responder<GetPartitionSize, ___T>,
) -> impl Future<Output = ()>
fn get_partition_size( &mut self, request: Request<GetPartitionSize, ___T>, responder: Responder<GetPartitionSize, ___T>, ) -> impl Future<Output = ()>
Returns the size in bytes of a raw partition by name.
Sourcefn read_partition(
&mut self,
request: Request<ReadPartition, ___T>,
responder: Responder<ReadPartition, ___T>,
) -> impl Future<Output = ()>
fn read_partition( &mut self, request: Request<ReadPartition, ___T>, responder: Responder<ReadPartition, ___T>, ) -> impl Future<Output = ()>
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.
Sourcefn write_partition(
&mut self,
request: Request<WritePartition, ___T>,
responder: Responder<WritePartition, ___T>,
) -> impl Future<Output = ()>
fn write_partition( &mut self, request: Request<WritePartition, ___T>, responder: Responder<WritePartition, ___T>, ) -> impl Future<Output = ()>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".