[−][src]Struct zookeeper_async::Permission
Describes the ability of a user to perform a certain action.
Permissions can be mixed together like integers with | and &.
Implementations
impl Permission[src]
pub const NONE: Permission[src]
No permissions are set (server could have been configured without ACL support).
pub const READ: Permission[src]
You can access the data of a node and can list its children.
pub const WRITE: Permission[src]
You can set the data of a node.
pub const CREATE: Permission[src]
You can create a child node.
pub const DELETE: Permission[src]
You can delete a child node (but not necessarily this one).
pub const ADMIN: Permission[src]
You can alter permissions on this node.
pub const ALL: Permission[src]
You can do anything.
pub fn can(self, permissions: Permission) -> bool[src]
Check that all permissions are set.
use zookeeper_async::Permission; (Permission::READ | Permission::WRITE).can(Permission::WRITE); // -> true Permission::ADMIN.can(Permission::CREATE); // -> false
Trait Implementations
impl BitAnd<Permission> for Permission[src]
type Output = Self
The resulting type after applying the & operator.
pub fn bitand(self, rhs: Self) -> Self[src]
impl BitOr<Permission> for Permission[src]
type Output = Self
The resulting type after applying the | operator.
pub fn bitor(self, rhs: Self) -> Self[src]
impl Clone for Permission[src]
pub fn clone(&self) -> Permission[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Permission[src]
impl Debug for Permission[src]
impl Display for Permission[src]
impl PartialEq<Permission> for Permission[src]
pub fn eq(&self, other: &Permission) -> bool[src]
pub fn ne(&self, other: &Permission) -> bool[src]
impl StructuralPartialEq for Permission[src]
Auto Trait Implementations
impl RefUnwindSafe for Permission[src]
impl Send for Permission[src]
impl Sync for Permission[src]
impl Unpin for Permission[src]
impl UnwindSafe for Permission[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,