pub struct Permission(/* private fields */);
Expand description
Permission expresses rights accessors should have to operate on attached node.
Implementations§
Source§impl Permission
impl Permission
Sourcepub const READ: Permission
pub const READ: Permission
Permission to get data from a node and list its children.
Sourcepub const WRITE: Permission
pub const WRITE: Permission
Permission to set data for a node.
Sourcepub const CREATE: Permission
pub const CREATE: Permission
Permission to create a child node.
Sourcepub const DELETE: Permission
pub const DELETE: Permission
Permission to delete a child node.
Sourcepub const ADMIN: Permission
pub const ADMIN: Permission
Permission to set ACL permissions.
Sourcepub const ALL: Permission
pub const ALL: Permission
Permission to do all above.
Sourcepub const NONE: Permission
pub const NONE: Permission
Permission to do none of above.
Sourcepub fn has(self, perm: Permission) -> bool
pub fn has(self, perm: Permission) -> bool
Test whether this permission has given permission. Same as self & perm == perm
.
Trait Implementations§
Source§impl BitAnd for Permission
impl BitAnd for Permission
Source§impl BitOr for Permission
impl BitOr for Permission
Source§impl Clone for Permission
impl Clone for Permission
Source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
Returns a duplicate of the value. Read more
1.0.0 · 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 Permission
impl Debug for Permission
Source§impl Display for Permission
impl Display for Permission
Source§impl Hash for Permission
impl Hash for Permission
Source§impl PartialEq for Permission
impl PartialEq for Permission
Source§impl TryFrom<i32> for Permission
impl TryFrom<i32> for Permission
impl Copy for Permission
impl Eq for Permission
impl StructuralPartialEq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl Send for Permission
impl Sync for Permission
impl Unpin for Permission
impl UnwindSafe for Permission
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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more