pub struct SessionManager<I: Interface + ?Sized> { /* private fields */ }Implementations§
Source§impl<I: Interface + ?Sized> SessionManager<I>
impl<I: Interface + ?Sized> SessionManager<I>
Trait Implementations§
Source§impl<I: Interface + ?Sized> SessionManager for SessionManager<I>
impl<I: Interface + ?Sized> SessionManager for SessionManager<I>
const SUPPORTS_DECOMPRESSION: bool = true
Source§type Orchestrator = SessionManager<I>
type Orchestrator = SessionManager<I>
The Orchestrator is an object that holds the in BlockServer, to avoid
nested Arcs in concrete implementations which need to keep additional state.
SessionManager and any other state that needs
to be shared between sessions. It is responsible for keeping the SessionManager alive.
We use this type instead of directly holding an Arctype Session = usize
async fn on_attach_vmo( orchestrator: Arc<Self>, vmo: &Arc<Vmo>, ) -> Result<(), Status>
Source§async fn open_session(
orchestrator: Arc<Self>,
stream: SessionRequestStream,
offset_map: OffsetMap,
block_size: u32,
) -> Result<(), Error>
async fn open_session( orchestrator: Arc<Self>, stream: SessionRequestStream, offset_map: OffsetMap, block_size: u32, ) -> Result<(), Error>
Creates a new session to handle
stream.
The returned future should run until the session completes, for example when the client end
closes.
offset_map, will be used to adjust the block offset/length of FIFO requests.Source§fn get_info(&self) -> Cow<'_, DeviceInfo>
fn get_info(&self) -> Cow<'_, DeviceInfo>
Called to get block/partition information for Block::GetInfo, Partition::GetTypeGuid, etc.
Source§async fn get_volume_info(
&self,
) -> Result<(VolumeManagerInfo, VolumeInfo), Status>
async fn get_volume_info( &self, ) -> Result<(VolumeManagerInfo, VolumeInfo), Status>
Called to handle the GetVolumeInfo FIDL call.
Source§async fn query_slices(
&self,
start_slices: &[u64],
) -> Result<Vec<VsliceRange>, Status>
async fn query_slices( &self, start_slices: &[u64], ) -> Result<Vec<VsliceRange>, Status>
Called to handle the QuerySlices FIDL call.
Source§async fn extend(&self, start_slice: u64, slice_count: u64) -> Result<(), Status>
async fn extend(&self, start_slice: u64, slice_count: u64) -> Result<(), Status>
Called to handle the Shrink FIDL call.
Source§async fn shrink(&self, start_slice: u64, slice_count: u64) -> Result<(), Status>
async fn shrink(&self, start_slice: u64, slice_count: u64) -> Result<(), Status>
Called to handle the Shrink FIDL call.
Source§fn active_requests(&self) -> &ActiveRequests<Self::Session>
fn active_requests(&self) -> &ActiveRequests<Self::Session>
Returns the active requests.
Auto Trait Implementations§
impl<I> !Freeze for SessionManager<I>
impl<I> !RefUnwindSafe for SessionManager<I>
impl<I> Send for SessionManager<I>where
I: ?Sized,
impl<I> Sync for SessionManager<I>where
I: ?Sized,
impl<I> Unpin for SessionManager<I>where
I: ?Sized,
impl<I> UnsafeUnpin for SessionManager<I>where
I: ?Sized,
impl<I> !UnwindSafe for SessionManager<I>
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
Mutably borrows from an owned value. Read more