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 copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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