pub struct Rights(pub u8);Expand description
Bit-flag rights encoded in a capability.
Rights are represented as a u8 bitmask. Standard combinations are
provided as associated constants.
| Flag | Value |
|---|---|
| NONE | 0x00 |
| READ | 0x01 |
| WRITE | 0x02 |
| EXECUTE | 0x04 |
| DELEGATE | 0x08 |
| ALL | 0x0F |
Tuple Fields§
§0: u8Implementations§
Source§impl Rights
impl Rights
Sourcepub fn contains(self, other: Rights) -> bool
pub fn contains(self, other: Rights) -> bool
Returns true if this set contains all the given rights.
Sourcepub fn union(self, other: Rights) -> Rights
pub fn union(self, other: Rights) -> Rights
Returns a new Rights set with the given flags added.
Trait Implementations§
impl Copy for Rights
Source§impl<'de> Deserialize<'de> for Rights
impl<'de> Deserialize<'de> for Rights
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Rights
impl StructuralPartialEq for Rights
Auto Trait Implementations§
impl Freeze for Rights
impl RefUnwindSafe for Rights
impl Send for Rights
impl Sync for Rights
impl Unpin for Rights
impl UnsafeUnpin for Rights
impl UnwindSafe for Rights
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.