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>
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>
Called when a new session request stream is opened. Constructs a SessionHelper with the
client-provided offset_map and device constraints, spawns the session runner via
I::spawn_session, and processes FIFO requests until the session channel is closed or
aborted.
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>>
Source§fn session_eq(a: &Arc<Session<I>>, b: &Arc<Session<I>>) -> bool
fn session_eq(a: &Arc<Session<I>>, b: &Arc<Session<I>>) -> bool
Returns true iff
a and b identify the same session. Used to scope
group-ID lookups in the shared active_requests slab to the originating
session.async fn on_attach_vmo( _orchestrator: Arc<Self::Orchestrator>, _vmo: &Arc<Vmo>, ) -> Result<(), Status>
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> !UnwindSafe 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,
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