pub struct Access(/* private fields */);Expand description
What a caller has to be allowed to do with a key.
Implementations§
Source§impl Access
impl Access
Sourcepub const fn bits(self) -> u8
pub const fn bits(self) -> u8
The two bits on their own, for something that has to store a lot of these and cannot spare a byte each.
The ACL is the caller. A user can carry hundreds of key patterns and every one of them holds a copy of this, so it is packed in beside the glob rather than kept as a type.
Sourcepub const fn from_bits(bits: u8) -> Access
pub const fn from_bits(bits: u8) -> Access
The other half of Access::bits.
Anything outside the two bits is dropped rather than trusted, so a caller that has stored the byte somewhere and read back rubbish gets a permission that is too small rather than one that is too large.
Trait Implementations§
impl Copy for Access
impl Eq for Access
impl StructuralPartialEq for Access
Auto Trait Implementations§
impl Freeze for Access
impl RefUnwindSafe for Access
impl Send for Access
impl Sync for Access
impl Unpin for Access
impl UnsafeUnpin for Access
impl UnwindSafe for Access
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more