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

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

Fields

§session: ServerEnd<SessionMarker>

Opens a new FIFO-based session on the block device.

§

ReadBlocks

Fields

§vmo: Vmo
§length: u64
§dev_offset: u64
§vmo_offset: u64

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

Fields

§vmo: Vmo
§length: u64
§dev_offset: u64
§vmo_offset: u64

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

Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.

§

GetInstanceGuid

Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.

§

GetName

Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.

§

ConnectToDeviceFidl

Fields

§server: Channel

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

This api will unbind all the children of this device synchronously. This will avoid watching for device removal by the clients.

§

ScheduleUnbind

Disconnect this device and allow its parent to be bound again. This may not complete before it returns.

§

GetTopologicalPath

Return the topological path for this device

§

GetMinDriverLogSeverity

Return the current logging flags for this device’s driver

§

SetMinDriverLogSeverity

Fields

§severity: LogLevelFilter

Set the logging flags for this device’s driver.

§

GetCurrentPerformanceState

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

source

pub fn into_get_info(self) -> Option<PartitionAndDeviceGetInfoResponder>

source

pub fn into_get_stats( self ) -> Option<(bool, PartitionAndDeviceGetStatsResponder)>

source

pub fn into_open_session( self ) -> Option<(ServerEnd<SessionMarker>, PartitionAndDeviceControlHandle)>

source

pub fn into_read_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionAndDeviceReadBlocksResponder)>

source

pub fn into_write_blocks( self ) -> Option<(Vmo, u64, u64, u64, PartitionAndDeviceWriteBlocksResponder)>

source

pub fn into_get_type_guid( self ) -> Option<PartitionAndDeviceGetTypeGuidResponder>

source

pub fn into_get_instance_guid( self ) -> Option<PartitionAndDeviceGetInstanceGuidResponder>

source

pub fn into_get_name(self) -> Option<PartitionAndDeviceGetNameResponder>

source

pub fn into_connect_to_device_fidl( self ) -> Option<(Channel, PartitionAndDeviceControlHandle)>

source

pub fn into_bind(self) -> Option<(String, PartitionAndDeviceBindResponder)>

source

pub fn into_rebind(self) -> Option<(String, PartitionAndDeviceRebindResponder)>

source

pub fn into_unbind_children( self ) -> Option<PartitionAndDeviceUnbindChildrenResponder>

source

pub fn into_schedule_unbind( self ) -> Option<PartitionAndDeviceScheduleUnbindResponder>

source

pub fn into_get_topological_path( self ) -> Option<PartitionAndDeviceGetTopologicalPathResponder>

source

pub fn into_get_min_driver_log_severity( self ) -> Option<PartitionAndDeviceGetMinDriverLogSeverityResponder>

source

pub fn into_set_min_driver_log_severity( self ) -> Option<(LogLevelFilter, PartitionAndDeviceSetMinDriverLogSeverityResponder)>

source

pub fn into_get_current_performance_state( self ) -> Option<PartitionAndDeviceGetCurrentPerformanceStateResponder>

source

pub fn into_set_performance_state( self ) -> Option<(u32, PartitionAndDeviceSetPerformanceStateResponder)>

source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

source§

impl Debug for PartitionAndDeviceRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more