pub struct Capability<'a>(/* private fields */);
Expand description
The name of a single capability.
Implementations§
source§impl<'a> Capability<'a>
impl<'a> Capability<'a>
sourcepub fn name(&self) -> &'a BStr
pub fn name(&self) -> &'a BStr
Returns the name of the capability.
Most capabilities only consist of a name, making them appear like a feature toggle.
sourcepub fn value(&self) -> Option<&'a BStr>
pub fn value(&self) -> Option<&'a BStr>
Returns the value associated with the capability.
Note that the caller must know whether a single or multiple values are expected, in which
case values()
should be called.
Auto Trait Implementations§
impl<'a> Freeze for Capability<'a>
impl<'a> RefUnwindSafe for Capability<'a>
impl<'a> Send for Capability<'a>
impl<'a> Sync for Capability<'a>
impl<'a> Unpin for Capability<'a>
impl<'a> UnwindSafe for Capability<'a>
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