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 Borrow<SessionManager<InterfaceAdapter>> for Orchestrator
impl Borrow<SessionManager<InterfaceAdapter>> for Orchestrator
Source§fn borrow(&self) -> &SessionManager<InterfaceAdapter>
fn borrow(&self) -> &SessionManager<InterfaceAdapter>
Immutably borrows from an owned value. Read more
Source§impl<I: Interface + ?Sized> SessionManager for SessionManager<I>
impl<I: Interface + ?Sized> SessionManager for SessionManager<I>
const SUPPORTS_DECOMPRESSION: bool = false
Source§type Orchestrator = <I as Interface>::Orchestrator
type Orchestrator = <I as Interface>::Orchestrator
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 = Arc<Session<I>>
async fn on_attach_vmo( _orchestrator: Arc<Self::Orchestrator>, _vmo: &Arc<Vmo>, ) -> Result<(), Status>
Source§async fn open_session(
orchestrator: Arc<Self::Orchestrator>,
stream: SessionRequestStream,
offset_map: OffsetMap,
block_size: u32,
) -> Result<(), Error>
async fn open_session( orchestrator: Arc<Self::Orchestrator>, 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§fn active_requests(&self) -> &ActiveRequests<Arc<Session<I>>>
fn active_requests(&self) -> &ActiveRequests<Arc<Session<I>>>
Returns the active requests.
Source§fn get_volume_info(
&self,
) -> impl Future<Output = Result<(VolumeManagerInfo, VolumeInfo), Status>> + Send
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
fn query_slices( &self, _start_slices: &[u64], ) -> impl Future<Output = Result<Vec<VsliceRange>, Status>> + Send
Called to handle the QuerySlices FIDL call.
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