pub enum VolumeAndNodeRequest {
Show 37 variants GetInfo { responder: VolumeAndNodeGetInfoResponder, }, GetStats { clear: bool, responder: VolumeAndNodeGetStatsResponder, }, OpenSession { session: ServerEnd<SessionMarker>, control_handle: VolumeAndNodeControlHandle, }, ReadBlocks { vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64, responder: VolumeAndNodeReadBlocksResponder, }, WriteBlocks { vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64, responder: VolumeAndNodeWriteBlocksResponder, }, GetTypeGuid { responder: VolumeAndNodeGetTypeGuidResponder, }, GetInstanceGuid { responder: VolumeAndNodeGetInstanceGuidResponder, }, GetName { responder: VolumeAndNodeGetNameResponder, }, QuerySlices { start_slices: Vec<u64>, responder: VolumeAndNodeQuerySlicesResponder, }, GetVolumeInfo { responder: VolumeAndNodeGetVolumeInfoResponder, }, Extend { start_slice: u64, slice_count: u64, responder: VolumeAndNodeExtendResponder, }, Shrink { start_slice: u64, slice_count: u64, responder: VolumeAndNodeShrinkResponder, }, Destroy { responder: VolumeAndNodeDestroyResponder, }, Clone { flags: OpenFlags, object: ServerEnd<NodeMarker>, control_handle: VolumeAndNodeControlHandle, }, GetAttr { responder: VolumeAndNodeGetAttrResponder, }, SetAttr { flags: NodeAttributeFlags, attributes: NodeAttributes, responder: VolumeAndNodeSetAttrResponder, }, GetFlags { responder: VolumeAndNodeGetFlagsResponder, }, SetFlags { flags: OpenFlags, responder: VolumeAndNodeSetFlagsResponder, }, QueryFilesystem { responder: VolumeAndNodeQueryFilesystemResponder, }, Close { responder: VolumeAndNodeCloseResponder, }, Query { responder: VolumeAndNodeQueryResponder, }, Reopen { rights_request: RightsRequest, object_request: ServerEnd<NodeMarker>, control_handle: VolumeAndNodeControlHandle, }, GetConnectionInfo { responder: VolumeAndNodeGetConnectionInfoResponder, }, GetAttributes { query: NodeAttributesQuery, responder: VolumeAndNodeGetAttributesResponder, }, UpdateAttributes { payload: MutableNodeAttributes, responder: VolumeAndNodeUpdateAttributesResponder, }, Sync { responder: VolumeAndNodeSyncResponder, }, ListExtendedAttributes { iterator: ServerEnd<ExtendedAttributeIteratorMarker>, control_handle: VolumeAndNodeControlHandle, }, GetExtendedAttribute { name: Vec<u8>, responder: VolumeAndNodeGetExtendedAttributeResponder, }, SetExtendedAttribute { name: Vec<u8>, value: ExtendedAttributeValue, mode: SetExtendedAttributeMode, responder: VolumeAndNodeSetExtendedAttributeResponder, }, RemoveExtendedAttribute { name: Vec<u8>, responder: VolumeAndNodeRemoveExtendedAttributeResponder, }, ConnectToDeviceFidl { server: Channel, control_handle: VolumeAndNodeControlHandle, }, ConnectToController { server: ServerEnd<ControllerMarker>, control_handle: VolumeAndNodeControlHandle, }, Bind { driver: String, responder: VolumeAndNodeBindResponder, }, Rebind { driver: String, responder: VolumeAndNodeRebindResponder, }, UnbindChildren { responder: VolumeAndNodeUnbindChildrenResponder, }, ScheduleUnbind { responder: VolumeAndNodeScheduleUnbindResponder, }, GetTopologicalPath { responder: VolumeAndNodeGetTopologicalPathResponder, },
}
Expand description

This protocol is intended to emulate a block device.

Variants§

§

GetInfo

Get information about the underlying block device.

§

GetStats

Returns stats about block device operations. Setting clear will reset stats counters.

§

OpenSession

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

Fields

§session: ServerEnd<SessionMarker>
§

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.

Fields

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

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.

Fields

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

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.

§

QuerySlices

Returns the number of contiguous allocated (or unallocated) vslices starting from each vslice.

Fields

§start_slices: Vec<u64>
§

GetVolumeInfo

Returns the information about this volume and the volume manager it is embedded in.

§

Extend

Extends the mapping of this partition.

The ability to extend the partition is dependent on having sufficient free space on the underlying device, having sufficient free slots for tracking the bytes in the volume manager header, and the partition limit (see VolumeManager.SetPartitionLimit).

Fields

§start_slice: u64
§slice_count: u64
§

Shrink

Shrinks a virtual partition. Returns ZX_OK if ANY slices are freed, even if part of the requested range contains unallocated slices.

Fields

§start_slice: u64
§slice_count: u64
§

Destroy

Destroys the current partition, removing it from the VolumeManager, and freeing all underlying storage. The connection to the volume is also closed.

§

Clone

Create another connection to the same remote object.

flags may be any of:

  • OpenFlags.RIGHT_*
  • OpenFlags.APPEND
  • OpenFlags.DESCRIBE
  • OpenFlags.CLONE_SAME_RIGHTS

All other flags are ignored.

The OpenFlags.RIGHT_* bits in flags request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object, otherwise returns ZX_ERR_ACCESS_DENIED. Alternatively, pass OpenFlags.CLONE_SAME_RIGHTS to inherit the rights on the source connection. It is invalid to pass any of the OpenFlags.RIGHT_* flags together with OpenFlags.CLONE_SAME_RIGHTS.

Fields

§flags: OpenFlags
§object: ServerEnd<NodeMarker>
§

GetAttr

Acquires information about the node.

This method does not require any rights.

§

SetAttr

Updates information about the node.

This method requires following rights: OpenFlags.RIGHT_WRITABLE, otherwise returns ZX_ERR_BAD_HANDLE.

Fields

§flags: NodeAttributeFlags
§attributes: NodeAttributes
§

GetFlags

Acquires the Directory.Open rights and flags used to access this file.

This method does not require any rights.

§

SetFlags

Changes the Directory.Open flags used to access the file. Supported flags which can be turned on / off:

  • OpenFlags.APPEND

This method does not require any rights.

Fields

§flags: OpenFlags
§

QueryFilesystem

Query the filesystem for filesystem-specific information.

§

Close

Terminates the connection.

After calling Close, the client must not send any other requests.

Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.

Closing the client end of the channel should be semantically equivalent to calling Close without knowing when the close has completed or its status.

§

Query

§

Reopen

Creates another connection to the same node.

Fields

§rights_request: RightsRequest
§object_request: ServerEnd<NodeMarker>
§

GetConnectionInfo

Acquires information about the connection.

This method does not require any rights.

§

GetAttributes

Acquires information about the node.

The attributes of a node should be stable, independent of the specific protocol used to access it.

If a particular attribute is not applicable or not supported, filesystems should leave the corresponding field absent.

  • query a bit-mask specifying which attributes to fetch. The server should not return more than necessary.
  • attributes the returned attributes.

This method requires the [Rights.GET_ATTRIBUTES] right.

Fields

§query: NodeAttributesQuery
§

UpdateAttributes

Updates information about the node.

  • attributes the presence of a table field in attributes indicates the intent to update the corresponding attribute.

This method requires the [Rights.UPDATE_ATTRIBUTES] right.

Fields

§payload: MutableNodeAttributes
§

Sync

Synchronizes updates to the node to the underlying media, if it exists.

This method will return when the filesystem server has flushed the relevant updates to the underlying media, but does not guarantee the underlying media has persisted the information, nor that any information is committed to hardware. Clients may use Sync to ensure ordering between operations.

This method does not require any rights.

§

ListExtendedAttributes

Creates an iterator over all the extended attribute names associated with this node. If an error occurs it is returned as an epitaph on the iterator request channel, and then the channel is closed.

GetExtendedAttributes can be used with any of these names to retrieve the associated value.

This method requires the [Rights.GET_ATTRIBUTES] right.

Fields

§iterator: ServerEnd<ExtendedAttributeIteratorMarker>
§

GetExtendedAttribute

Get the value associated with the given attribute name for this node.

Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No particular structure is imposed on them.

This method requires the [Rights.GET_ATTRIBUTES] right.

§

SetExtendedAttribute

Set the value for the given attribute name to value for this node.

The attribute name may exist, in which case the attribute is updated. If the attribute doesn’t exist, it is created. The name should have no null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.

This method requires the [Rights.UPDATE_ATTRIBUTES] right.

Fields

§name: Vec<u8>
§value: ExtendedAttributeValue
§mode: SetExtendedAttributeMode
§

RemoveExtendedAttribute

Remove the specified extended attribute.

If the attribute doesn’t exist, ZX_ERR_NOT_FOUND is returned.

This method requires the [Rights.UPDATE_ATTRIBUTES] right.

§

ConnectToDeviceFidl

Connect to the underlying device’s FIDL protocol. This connection will not be multiplexed with fuchsia.device.Controller or fuchsia.io.Node.

Fields

§server: Channel
§

ConnectToController

Connect to the same Controller FIDL protocol.

Fields

§server: ServerEnd<ControllerMarker>
§

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.

Fields

§driver: String
§

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

Implementations§

source§

impl VolumeAndNodeRequest

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn into_query_slices( self ) -> Option<(Vec<u64>, VolumeAndNodeQuerySlicesResponder)>

source

pub fn into_get_volume_info(self) -> Option<VolumeAndNodeGetVolumeInfoResponder>

source

pub fn into_extend(self) -> Option<(u64, u64, VolumeAndNodeExtendResponder)>

source

pub fn into_shrink(self) -> Option<(u64, u64, VolumeAndNodeShrinkResponder)>

source

pub fn into_destroy(self) -> Option<VolumeAndNodeDestroyResponder>

source

pub fn into_clone( self ) -> Option<(OpenFlags, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_get_attr(self) -> Option<VolumeAndNodeGetAttrResponder>

source

pub fn into_set_attr( self ) -> Option<(NodeAttributeFlags, NodeAttributes, VolumeAndNodeSetAttrResponder)>

source

pub fn into_get_flags(self) -> Option<VolumeAndNodeGetFlagsResponder>

source

pub fn into_set_flags( self ) -> Option<(OpenFlags, VolumeAndNodeSetFlagsResponder)>

source

pub fn into_query_filesystem( self ) -> Option<VolumeAndNodeQueryFilesystemResponder>

source

pub fn into_close(self) -> Option<VolumeAndNodeCloseResponder>

source

pub fn into_query(self) -> Option<VolumeAndNodeQueryResponder>

source

pub fn into_reopen( self ) -> Option<(RightsRequest, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_get_connection_info( self ) -> Option<VolumeAndNodeGetConnectionInfoResponder>

source

pub fn into_get_attributes( self ) -> Option<(NodeAttributesQuery, VolumeAndNodeGetAttributesResponder)>

source

pub fn into_update_attributes( self ) -> Option<(MutableNodeAttributes, VolumeAndNodeUpdateAttributesResponder)>

source

pub fn into_sync(self) -> Option<VolumeAndNodeSyncResponder>

source

pub fn into_list_extended_attributes( self ) -> Option<(ServerEnd<ExtendedAttributeIteratorMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_get_extended_attribute( self ) -> Option<(Vec<u8>, VolumeAndNodeGetExtendedAttributeResponder)>

source

pub fn into_set_extended_attribute( self ) -> Option<(Vec<u8>, ExtendedAttributeValue, SetExtendedAttributeMode, VolumeAndNodeSetExtendedAttributeResponder)>

source

pub fn into_remove_extended_attribute( self ) -> Option<(Vec<u8>, VolumeAndNodeRemoveExtendedAttributeResponder)>

source

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

source

pub fn into_connect_to_controller( self ) -> Option<(ServerEnd<ControllerMarker>, VolumeAndNodeControlHandle)>

source

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

source

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

source

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

source

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

source

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

source

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

Name of the method defined in FIDL

Trait Implementations§

source§

impl Debug for VolumeAndNodeRequest

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 T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 T
where U: From<T>,

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 = _

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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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