pub enum PartitionAndDeviceRequest {
Show 18 variants
GetInfo {
responder: PartitionAndDeviceGetInfoResponder,
},
GetStats {
clear: bool,
responder: PartitionAndDeviceGetStatsResponder,
},
OpenSession {
session: ServerEnd<SessionMarker>,
control_handle: PartitionAndDeviceControlHandle,
},
ReadBlocks {
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64,
responder: PartitionAndDeviceReadBlocksResponder,
},
WriteBlocks {
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64,
responder: PartitionAndDeviceWriteBlocksResponder,
},
GetTypeGuid {
responder: PartitionAndDeviceGetTypeGuidResponder,
},
GetInstanceGuid {
responder: PartitionAndDeviceGetInstanceGuidResponder,
},
GetName {
responder: PartitionAndDeviceGetNameResponder,
},
ConnectToDeviceFidl {
server: Channel,
control_handle: PartitionAndDeviceControlHandle,
},
Bind {
driver: String,
responder: PartitionAndDeviceBindResponder,
},
Rebind {
driver: String,
responder: PartitionAndDeviceRebindResponder,
},
UnbindChildren {
responder: PartitionAndDeviceUnbindChildrenResponder,
},
ScheduleUnbind {
responder: PartitionAndDeviceScheduleUnbindResponder,
},
GetTopologicalPath {
responder: PartitionAndDeviceGetTopologicalPathResponder,
},
GetMinDriverLogSeverity {
responder: PartitionAndDeviceGetMinDriverLogSeverityResponder,
},
SetMinDriverLogSeverity {
severity: LogLevelFilter,
responder: PartitionAndDeviceSetMinDriverLogSeverityResponder,
},
GetCurrentPerformanceState {
responder: PartitionAndDeviceGetCurrentPerformanceStateResponder,
},
SetPerformanceState {
requested_state: u32,
responder: PartitionAndDeviceSetPerformanceStateResponder,
},
}
Expand description
Protocol for types which need to implement both Partition and fuchsia.device.Controller.
Variants§
GetInfo
Fields
responder: PartitionAndDeviceGetInfoResponder
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: PartitionAndDeviceGetTypeGuidResponder
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: PartitionAndDeviceGetInstanceGuidResponder
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: PartitionAndDeviceGetNameResponder
Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.
ConnectToDeviceFidl
Connect to the underlying device’s FIDL protocol. This connection will not be multiplexed with fuchsia.device.Controller or fuchsia.io.Node.
Bind
Attempt to bind a driver to this device.
- request
driver
This represents the suffix of a driver URL (e.g: “fvm.cm”). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.
Rebind
Unbind all the children of this device, and then attempt to bind a driver to the device. This will not return until the bind completes.
- request
driver
This represents the suffix of a driver URL (e.g: “fvm.cm”). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.
UnbindChildren
Fields
responder: PartitionAndDeviceUnbindChildrenResponder
This api will unbind all the children of this device synchronously. This will avoid watching for device removal by the clients.
ScheduleUnbind
Fields
responder: PartitionAndDeviceScheduleUnbindResponder
Disconnect this device and allow its parent to be bound again. This may not complete before it returns.
GetTopologicalPath
Fields
Return the topological path for this device
GetMinDriverLogSeverity
Fields
Return the current logging flags for this device’s driver
SetMinDriverLogSeverity
Set the logging flags for this device’s driver.
GetCurrentPerformanceState
Fields
Gets the current performance state of the device.
SetPerformanceState
Set the performance state of this device to the requested performance state. This is only called for the current device and none of the descendants are aware of the state transition. Returns ZX_OK, if the device is in a working state and the performance state is changed to requested_state successfully. out_state will be same as requested_state. Returns error status, if switching to the requested_state was unsuccessful. out_state is the state that the device is currently in.
Implementations§
source§impl PartitionAndDeviceRequest
impl PartitionAndDeviceRequest
pub fn into_get_info(self) -> Option<PartitionAndDeviceGetInfoResponder>
pub fn into_get_stats( self ) -> Option<(bool, PartitionAndDeviceGetStatsResponder)>
pub fn into_open_session( self ) -> Option<(ServerEnd<SessionMarker>, PartitionAndDeviceControlHandle)>
pub fn into_read_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionAndDeviceReadBlocksResponder)>
pub fn into_write_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionAndDeviceWriteBlocksResponder)>
pub fn into_get_type_guid( self ) -> Option<PartitionAndDeviceGetTypeGuidResponder>
pub fn into_get_instance_guid( self ) -> Option<PartitionAndDeviceGetInstanceGuidResponder>
pub fn into_get_name(self) -> Option<PartitionAndDeviceGetNameResponder>
pub fn into_connect_to_device_fidl( self ) -> Option<(Channel, PartitionAndDeviceControlHandle)>
pub fn into_bind(self) -> Option<(String, PartitionAndDeviceBindResponder)>
pub fn into_rebind(self) -> Option<(String, PartitionAndDeviceRebindResponder)>
pub fn into_unbind_children( self ) -> Option<PartitionAndDeviceUnbindChildrenResponder>
pub fn into_schedule_unbind( self ) -> Option<PartitionAndDeviceScheduleUnbindResponder>
pub fn into_get_topological_path( self ) -> Option<PartitionAndDeviceGetTopologicalPathResponder>
pub fn into_get_min_driver_log_severity( self ) -> Option<PartitionAndDeviceGetMinDriverLogSeverityResponder>
pub fn into_set_min_driver_log_severity( self ) -> Option<(LogLevelFilter, PartitionAndDeviceSetMinDriverLogSeverityResponder)>
pub fn into_get_current_performance_state( self ) -> Option<PartitionAndDeviceGetCurrentPerformanceStateResponder>
pub fn into_set_performance_state( self ) -> Option<(u32, PartitionAndDeviceSetPerformanceStateResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL