Struct zookeeper::Acl
[−]
[src]
pub struct Acl { pub perms: Permission, pub scheme: String, pub id: String, }
An access control list.
In general, the ACL system is similar to UNIX file access permissions, where znodes act as
files. Unlike UNIX, each znode can have any number of ACLs to correspond with the potentially
limitless (and pluggable) authentication schemes. A more surprising difference is that ACLs are
not recursive: If /path
is only readable by a single user, but /path/sub
is world-readable,
then anyone will be able to read /path/sub
.
See the ZooKeeper Programmer's Guide for more information.
Fields
perms: Permission
The permissions associated with this ACL.
scheme: String
The authentication scheme this list is used for. The most common scheme is "auth"
, which
allows any authenticated user to do anything (see creator_all
).
id: String
The ID of the user under the scheme
. For example, with the "ip"
scheme
, this is an IP
address or CIDR netmask.
Methods
impl Acl
[src]
fn new<T, U>(permissions: Permission, scheme: T, id: U) -> Acl where
T: ToString,
U: ToString,
T: ToString,
U: ToString,
Create a new ACL with the given permissions
, scheme
, and id
.
fn creator_all() -> &'static Vec<Acl>
This ACL gives the creators authentication id's all permissions.
fn open_unsafe() -> &'static Vec<Acl>
This is a completely open ACL.
fn read_unsafe() -> &'static Vec<Acl>
This ACL gives the world the ability to read.
Trait Implementations
impl Clone for Acl
[src]
fn clone(&self) -> Acl
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Acl
[src]
impl PartialEq for Acl
[src]
fn eq(&self, __arg_0: &Acl) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Acl) -> bool
This method tests for !=
.