[][src]Struct zookeeper_async::Permission

pub struct 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.

impl BitOr<Permission> for Permission[src]

type Output = Self

The resulting type after applying the | operator.

impl Clone for Permission[src]

impl Copy for Permission[src]

impl Debug for Permission[src]

impl Display for Permission[src]

impl PartialEq<Permission> for Permission[src]

impl StructuralPartialEq for Permission[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.