pub enum PartitionRequest {
GetInfo {
responder: PartitionGetInfoResponder,
},
GetStats {
clear: bool,
responder: PartitionGetStatsResponder,
},
OpenSession {
session: ServerEnd<SessionMarker>,
control_handle: PartitionControlHandle,
},
ReadBlocks {
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64,
responder: PartitionReadBlocksResponder,
},
WriteBlocks {
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64,
responder: PartitionWriteBlocksResponder,
},
GetTypeGuid {
responder: PartitionGetTypeGuidResponder,
},
GetInstanceGuid {
responder: PartitionGetInstanceGuidResponder,
},
GetName {
responder: PartitionGetNameResponder,
},
}
Expand description
Partition describes a region of one or more block devices, labelled with distinguishing identifiers.
Variants§
GetInfo
Fields
responder: PartitionGetInfoResponder
Get information about the underlying block device.
GetStats
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.
OpenSession
Opens a new FIFO-based session on the block device.
ReadBlocks
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.
WriteBlocks
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.
GetTypeGuid
Fields
responder: PartitionGetTypeGuidResponder
Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.
GetInstanceGuid
Fields
responder: PartitionGetInstanceGuidResponder
Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.
GetName
Fields
responder: PartitionGetNameResponder
Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.
Implementations§
source§impl PartitionRequest
impl PartitionRequest
pub fn into_get_info(self) -> Option<PartitionGetInfoResponder>
pub fn into_get_stats(self) -> Option<(bool, PartitionGetStatsResponder)>
pub fn into_open_session( self ) -> Option<(ServerEnd<SessionMarker>, PartitionControlHandle)>
pub fn into_read_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionReadBlocksResponder)>
pub fn into_write_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionWriteBlocksResponder)>
pub fn into_get_type_guid(self) -> Option<PartitionGetTypeGuidResponder>
pub fn into_get_instance_guid(self) -> Option<PartitionGetInstanceGuidResponder>
pub fn into_get_name(self) -> Option<PartitionGetNameResponder>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL