pub struct CapabilitySet {
pub alloc: Option<AllocLevel>,
pub io: Option<IoLevel>,
pub ptr: Option<PtrLevel>,
}Expand description
The full set of capabilities a function/module may declare or exhibit.
A category left None means “not declared” —
CapabilitySet::alloc_or_none and friends treat an undeclared
category as the most restrictive level, matching the RFC’s “undeclared
= not permitted” model.
Fields§
§alloc: Option<AllocLevel>Declared/detected allocation capability, if any.
io: Option<IoLevel>Declared/detected I/O capability, if any.
ptr: Option<PtrLevel>Declared/detected raw-pointer capability, if any.
Implementations§
Source§impl CapabilitySet
impl CapabilitySet
Sourcepub fn alloc_or_none(&self) -> AllocLevel
pub fn alloc_or_none(&self) -> AllocLevel
The declared/detected AllocLevel, defaulting to AllocLevel::None.
Sourcepub fn io_or_none(&self) -> IoLevel
pub fn io_or_none(&self) -> IoLevel
The declared/detected IoLevel, defaulting to IoLevel::None.
Sourcepub fn ptr_or_none(&self) -> PtrLevel
pub fn ptr_or_none(&self) -> PtrLevel
The declared/detected PtrLevel, defaulting to PtrLevel::None.
Trait Implementations§
Source§impl Clone for CapabilitySet
impl Clone for CapabilitySet
Source§fn clone(&self) -> CapabilitySet
fn clone(&self) -> CapabilitySet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CapabilitySet
impl Debug for CapabilitySet
Source§impl Default for CapabilitySet
impl Default for CapabilitySet
Source§fn default() -> CapabilitySet
fn default() -> CapabilitySet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CapabilitySet
impl RefUnwindSafe for CapabilitySet
impl Send for CapabilitySet
impl Sync for CapabilitySet
impl Unpin for CapabilitySet
impl UnsafeUnpin for CapabilitySet
impl UnwindSafe for CapabilitySet
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