#[repr(C)]pub struct Capability {
pub object_id: u64,
pub object_type: ObjectType,
pub rights: CapRights,
pub badge: u64,
pub epoch: u64,
}Expand description
A capability is a kernel-managed, unforgeable access token.
Capabilities follow seL4’s design principles:
- No syscall succeeds without an appropriate capability handle
- A task can only grant capabilities it holds, with equal or fewer rights
- Revoking a capability invalidates all derived capabilities
Fields§
§object_id: u64Unique identifier for the kernel object.
object_type: ObjectTypeThe type of kernel object.
rights: CapRightsRights bitmap determining permitted operations.
badge: u64Caller-visible identifier for demultiplexing. Allows a task to distinguish between multiple capabilities to the same underlying object.
epoch: u64Epoch counter for capability revocation. Invalidated if the object is destroyed or the capability is revoked.
Implementations§
Source§impl Capability
impl Capability
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
impl Copy for Capability
impl Eq for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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