pub enum CapabilityState {
Available,
Unsupported,
PermissionDenied,
Unknown,
}Expand description
Whether one capability is usable on this system.
Variants§
Available
Present and readable.
Unsupported
This platform or kernel does not provide it.
PermissionDenied
Present but the OS refuses the read at our privilege level.
Distinct from Unsupported because §4 requires a help hint suggesting
what elevated privileges would provide.
Unknown
Not probed yet.
Implementations§
Source§impl CapabilityState
impl CapabilityState
Sourcepub const fn privileges_might_help(self) -> bool
pub const fn privileges_might_help(self) -> bool
Whether elevated privileges would plausibly help.
Drives the help hint §4 requires. Note that §15.1 forbids monitrs from escalating on its own; this only informs the user.
Trait Implementations§
Source§impl Clone for CapabilityState
impl Clone for CapabilityState
Source§fn clone(&self) -> CapabilityState
fn clone(&self) -> CapabilityState
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 moreimpl Copy for CapabilityState
Source§impl Debug for CapabilityState
impl Debug for CapabilityState
Source§impl Default for CapabilityState
impl Default for CapabilityState
Source§fn default() -> CapabilityState
fn default() -> CapabilityState
Returns the “default value” for a type. Read more
impl Eq for CapabilityState
Source§impl PartialEq for CapabilityState
impl PartialEq for CapabilityState
impl StructuralPartialEq for CapabilityState
Auto Trait Implementations§
impl Freeze for CapabilityState
impl RefUnwindSafe for CapabilityState
impl Send for CapabilityState
impl Sync for CapabilityState
impl Unpin for CapabilityState
impl UnsafeUnpin for CapabilityState
impl UnwindSafe for CapabilityState
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