Struct tokio_zookeeper::Permission
source · pub struct Permission(/* private fields */);
Expand description
Describes the ability of a user to perform a certain action.
Permissions can be mixed together like integers with |
and &
.
Implementations§
source§impl Permission
impl Permission
sourcepub const NONE: Permission = _
pub const NONE: Permission = _
No permissions are set (server could have been configured without ACL support).
sourcepub const READ: Permission = _
pub const READ: Permission = _
You can access the data of a node and can list its children.
sourcepub const WRITE: Permission = _
pub const WRITE: Permission = _
You can set the data of a node.
sourcepub const CREATE: Permission = _
pub const CREATE: Permission = _
You can create a child node.
sourcepub const DELETE: Permission = _
pub const DELETE: Permission = _
You can delete a child node (but not necessarily this one).
sourcepub const ADMIN: Permission = _
pub const ADMIN: Permission = _
You can alter permissions on this node.
sourcepub const ALL: Permission = _
pub const ALL: Permission = _
You can do anything.
sourcepub fn can(self, permissions: Permission) -> bool
pub fn can(self, permissions: Permission) -> bool
Check that all permissions
are set.
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 PartialEq for Permission
impl PartialEq for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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