Struct tokio_zookeeper::Permission
source · pub struct Permission(_);
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<Permission> for Permission
impl BitAnd<Permission> for Permission
source§impl BitOr<Permission> for Permission
impl BitOr<Permission> 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<Permission> for Permission
impl PartialEq<Permission> 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 ==
.