Trait block_server::SessionManager

source ·
pub trait SessionManager: 'static {
    // Required methods
    fn on_attach_vmo(
        self: Arc<Self>,
        vmo: &Arc<Vmo>,
    ) -> impl Future<Output = Result<(), Status>> + Send;
    fn open_session(
        self: Arc<Self>,
        stream: SessionRequestStream,
        block_size: u32,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn get_info(
        &self,
    ) -> impl Future<Output = Result<Cow<'_, PartitionInfo>, Status>> + Send;

    // Provided methods
    fn get_volume_info(
        &self,
    ) -> impl Future<Output = Result<(VolumeManagerInfo, VolumeInfo), Status>> + Send { ... }
    fn query_slices(
        &self,
        _start_slices: &[u64],
    ) -> impl Future<Output = Result<Vec<VsliceRange>, Status>> + Send { ... }
    fn extend(
        &self,
        _start_slice: u64,
        _slice_count: u64,
    ) -> impl Future<Output = Result<(), Status>> + Send { ... }
    fn shrink(
        &self,
        _start_slice: u64,
        _slice_count: u64,
    ) -> impl Future<Output = Result<(), Status>> + Send { ... }
}

Required Methods§

source

fn on_attach_vmo( self: Arc<Self>, vmo: &Arc<Vmo>, ) -> impl Future<Output = Result<(), Status>> + Send

source

fn open_session( self: Arc<Self>, stream: SessionRequestStream, block_size: u32, ) -> impl Future<Output = Result<(), Error>> + Send

source

fn get_info( &self, ) -> impl Future<Output = Result<Cow<'_, PartitionInfo>, Status>> + Send

Called to get partition information for Partition::GetTypeGuid, etc.

Provided Methods§

source

fn get_volume_info( &self, ) -> impl Future<Output = Result<(VolumeManagerInfo, VolumeInfo), Status>> + Send

Called to handle the GetVolumeInfo FIDL call.

source

fn query_slices( &self, _start_slices: &[u64], ) -> impl Future<Output = Result<Vec<VsliceRange>, Status>> + Send

Called to handle the QuerySlices FIDL call.

source

fn extend( &self, _start_slice: u64, _slice_count: u64, ) -> impl Future<Output = Result<(), Status>> + Send

Called to handle the Shrink FIDL call.

source

fn shrink( &self, _start_slice: u64, _slice_count: u64, ) -> impl Future<Output = Result<(), Status>> + Send

Called to handle the Shrink FIDL call.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SessionManager for block_server::c_interface::SessionManager

source§

impl<I: Interface> SessionManager for block_server::async_interface::SessionManager<I>