pub struct CapabilityManager { /* private fields */ }Expand description
Global capability manager
Implementations§
Source§impl CapabilityManager
impl CapabilityManager
Sourcepub fn create_capability(
&self,
resource_type: ResourceType,
resource: usize,
permissions: CapPermissions,
) -> Capability
pub fn create_capability( &self, resource_type: ResourceType, resource: usize, permissions: CapPermissions, ) -> Capability
Register a new resource and return a capability to access it
Sourcepub fn revoke_capability(&self, id: CapId) -> Option<Capability>
pub fn revoke_capability(&self, id: CapId) -> Option<Capability>
Revoke a capability (removes it from the global table)
Auto Trait Implementations§
impl !Freeze for CapabilityManager
impl !RefUnwindSafe for CapabilityManager
impl Send for CapabilityManager
impl Sync for CapabilityManager
impl Unpin for CapabilityManager
impl UnsafeUnpin for CapabilityManager
impl UnwindSafe for CapabilityManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more