Struct zookeeper::Permission [] [src]

pub struct Permission(_);

Describes the ability of a user to perform a certain action.

Permissions can be mixed together like integers with | and &.

Methods

impl Permission
[src]

NONE: Permission = Permission(0)

No permissions are set (server could have been configured without ACL support).

READ: Permission = Permission(1)

You can access the data of a node and can list its children.

WRITE: Permission = Permission(2)

You can set the data of a node.

CREATE: Permission = Permission(4)

You can create a child node.

DELETE: Permission = Permission(8)

You can delete a child node (but not necessarily this one).

ADMIN: Permission = Permission(16)

You can alter permissions on this node.

ALL: Permission = Permission(31)

You can do anything.

[src]

Check that all permissions are set.

use zookeeper::Permission;

(Permission::READ | Permission::WRITE).can(Permission::WRITE); // -> true
Permission::ADMIN.can(Permission::CREATE); // -> false

Trait Implementations

impl Clone for Permission
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Permission
[src]

impl Debug for Permission
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Permission
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl BitAnd for Permission
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl BitOr for Permission
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl Display for Permission
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Permission

impl Sync for Permission