pub struct HandleMgr<ServerData> { /* private fields */ }
Expand description
A manager for open handles, per compartment.
Implementations§
source§impl<ServerData> HandleMgr<ServerData>
impl<ServerData> HandleMgr<ServerData>
sourcepub fn open_count(&self, comp: ObjID) -> usize
pub fn open_count(&self, comp: ObjID) -> usize
Get the number of currently open handles for a given compartment.
sourcepub fn lookup(&self, comp: ObjID, ds: Descriptor) -> Option<&ServerData>
pub fn lookup(&self, comp: ObjID, ds: Descriptor) -> Option<&ServerData>
Lookup the server data associated with a descriptor.
sourcepub fn insert(&mut self, comp: ObjID, sd: ServerData) -> Option<Descriptor>
pub fn insert(&mut self, comp: ObjID, sd: ServerData) -> Option<Descriptor>
Insert new server data, and return a descriptor for it.
sourcepub fn remove(&mut self, comp: ObjID, ds: Descriptor) -> Option<ServerData>
pub fn remove(&mut self, comp: ObjID, ds: Descriptor) -> Option<ServerData>
Remove a descriptor, returning the server data if present.
Trait Implementations§
Auto Trait Implementations§
impl<ServerData> !Crossing for HandleMgr<ServerData>
impl<ServerData> !ObjSafe for HandleMgr<ServerData>
impl<ServerData> RefUnwindSafe for HandleMgr<ServerData>where ServerData: RefUnwindSafe,
impl<ServerData> Send for HandleMgr<ServerData>where ServerData: Send,
impl<ServerData> Sync for HandleMgr<ServerData>where ServerData: Sync,
impl<ServerData> Unpin for HandleMgr<ServerData>where ServerData: Unpin,
impl<ServerData> UnwindSafe for HandleMgr<ServerData>where ServerData: UnwindSafe + RefUnwindSafe,
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