pub struct VolumeProxy { /* private fields */ }
Implementations§
Source§impl VolumeProxy
impl VolumeProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.block.volume/Volume.
Sourcepub fn take_event_stream(&self) -> VolumeEventStream
pub fn take_event_stream(&self) -> VolumeEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_info(
&self,
) -> QueryResponseFut<BlockGetInfoResult, DefaultFuchsiaResourceDialect>
pub fn get_info( &self, ) -> QueryResponseFut<BlockGetInfoResult, DefaultFuchsiaResourceDialect>
Get information about the underlying block device.
Sourcepub fn get_stats(
&self,
clear: bool,
) -> QueryResponseFut<BlockGetStatsResult, DefaultFuchsiaResourceDialect>
pub fn get_stats( &self, clear: bool, ) -> QueryResponseFut<BlockGetStatsResult, DefaultFuchsiaResourceDialect>
Returns stats about block device operations. Setting clear
will reset stats counters.
Sourcepub fn open_session(
&self,
session: ServerEnd<SessionMarker>,
) -> Result<(), Error>
pub fn open_session( &self, session: ServerEnd<SessionMarker>, ) -> Result<(), Error>
Opens a new FIFO-based session on the block device.
Sourcepub fn get_type_guid(
&self,
) -> QueryResponseFut<(i32, Option<Box<Guid>>), DefaultFuchsiaResourceDialect>
pub fn get_type_guid( &self, ) -> QueryResponseFut<(i32, Option<Box<Guid>>), DefaultFuchsiaResourceDialect>
Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.
Sourcepub fn get_instance_guid(
&self,
) -> QueryResponseFut<(i32, Option<Box<Guid>>), DefaultFuchsiaResourceDialect>
pub fn get_instance_guid( &self, ) -> QueryResponseFut<(i32, Option<Box<Guid>>), DefaultFuchsiaResourceDialect>
Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.
Sourcepub fn get_name(
&self,
) -> QueryResponseFut<(i32, Option<String>), DefaultFuchsiaResourceDialect>
pub fn get_name( &self, ) -> QueryResponseFut<(i32, Option<String>), DefaultFuchsiaResourceDialect>
Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.
Sourcepub fn get_metadata(
&self,
) -> QueryResponseFut<PartitionGetMetadataResult, DefaultFuchsiaResourceDialect>
pub fn get_metadata( &self, ) -> QueryResponseFut<PartitionGetMetadataResult, DefaultFuchsiaResourceDialect>
Gets the metadata for the partition.
Fields may be absent if the partition doesn’t have the given metadata.
Sourcepub fn query_slices(
&self,
start_slices: &[u64],
) -> QueryResponseFut<(i32, [VsliceRange; 16], u64), DefaultFuchsiaResourceDialect>
pub fn query_slices( &self, start_slices: &[u64], ) -> QueryResponseFut<(i32, [VsliceRange; 16], u64), DefaultFuchsiaResourceDialect>
Returns the number of contiguous allocated (or unallocated) vslices starting from each vslice.
Sourcepub fn get_volume_info(
&self,
) -> QueryResponseFut<(i32, Option<Box<VolumeManagerInfo>>, Option<Box<VolumeInfo>>), DefaultFuchsiaResourceDialect>
pub fn get_volume_info( &self, ) -> QueryResponseFut<(i32, Option<Box<VolumeManagerInfo>>, Option<Box<VolumeInfo>>), DefaultFuchsiaResourceDialect>
Returns the information about this volume and the volume manager it is embedded in.
Sourcepub fn extend(
&self,
start_slice: u64,
slice_count: u64,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
pub fn extend( &self, start_slice: u64, slice_count: u64, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
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).
Trait Implementations§
Source§impl Clone for VolumeProxy
impl Clone for VolumeProxy
Source§fn clone(&self) -> VolumeProxy
fn clone(&self) -> VolumeProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VolumeProxy
impl Debug for VolumeProxy
Source§impl Proxy for VolumeProxy
impl Proxy for VolumeProxy
Source§type Protocol = VolumeMarker
type Protocol = VolumeMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl VolumeProxyInterface for VolumeProxy
impl VolumeProxyInterface for VolumeProxy
type GetInfoResponseFut = QueryResponseFut<Result<BlockInfo, i32>>
type GetStatsResponseFut = QueryResponseFut<Result<BlockStats, i32>>
type GetTypeGuidResponseFut = QueryResponseFut<(i32, Option<Box<Guid>>)>
type GetInstanceGuidResponseFut = QueryResponseFut<(i32, Option<Box<Guid>>)>
type GetNameResponseFut = QueryResponseFut<(i32, Option<String>)>
type GetMetadataResponseFut = QueryResponseFut<Result<PartitionGetMetadataResponse, i32>>
type QuerySlicesResponseFut = QueryResponseFut<(i32, [VsliceRange; 16], u64)>
type GetVolumeInfoResponseFut = QueryResponseFut<(i32, Option<Box<VolumeManagerInfo>>, Option<Box<VolumeInfo>>)>
type ExtendResponseFut = QueryResponseFut<i32>
type ShrinkResponseFut = QueryResponseFut<i32>
type DestroyResponseFut = QueryResponseFut<i32>
fn get_info(&self) -> Self::GetInfoResponseFut
fn get_stats(&self, clear: bool) -> Self::GetStatsResponseFut
fn open_session(&self, session: ServerEnd<SessionMarker>) -> Result<(), Error>
fn get_type_guid(&self) -> Self::GetTypeGuidResponseFut
fn get_instance_guid(&self) -> Self::GetInstanceGuidResponseFut
fn get_name(&self) -> Self::GetNameResponseFut
fn get_metadata(&self) -> Self::GetMetadataResponseFut
fn query_slices(&self, start_slices: &[u64]) -> Self::QuerySlicesResponseFut
fn get_volume_info(&self) -> Self::GetVolumeInfoResponseFut
fn extend(&self, start_slice: u64, slice_count: u64) -> Self::ExtendResponseFut
fn shrink(&self, start_slice: u64, slice_count: u64) -> Self::ShrinkResponseFut
fn destroy(&self) -> Self::DestroyResponseFut
Auto Trait Implementations§
impl Freeze for VolumeProxy
impl !RefUnwindSafe for VolumeProxy
impl Send for VolumeProxy
impl Sync for VolumeProxy
impl Unpin for VolumeProxy
impl !UnwindSafe for VolumeProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)