Struct exacl::Acl[][src]

pub struct Acl { /* fields omitted */ }

Access Control List native object wrapper.

Each Acl is immutable once constructed. To manipulate its contents, you can retrieve a mutable vector of AclEntry, modify the vector's contents, then create a new Acl.

Implementations

impl Acl[src]

pub fn read(path: &Path, options: AclOption) -> Result<Acl>[src]

Read ACL for the specified file.

Errors

Returns an io::Error on failure.

pub fn write(&self, path: &Path, options: AclOption) -> Result<()>[src]

Write ACL for the specified file.

Errors

Returns an io::Error on failure.

pub fn from_entries(entries: &[AclEntry]) -> Result<Acl>[src]

Return an ACL from a slice of AclEntry.

On Linux, if there is no mask AclEntry, one will be computed and added, if needed.

Errors

Returns an io::Error on failure.

pub fn from_unified_entries(entries: &[AclEntry]) -> Result<(Acl, Acl)>[src]

Return pair of ACL's from slice of AclEntry. This method separates regular access entries from default entries and returns two ACL's, an access ACL and default ACL. Either may be empty.

If there is no mask AclEntry in an ACL, one will be computed and added, if needed.

Errors

Returns an io::Error on failure.

pub fn entries(&self) -> Result<Vec<AclEntry>>[src]

Return ACL as a vector of AclEntry.

Errors

Returns an io::Error on failure.

pub fn to_string(&self) -> Result<String>[src]

Return ACL as a string.

This method is provided as a tracing/debugging aid.

Errors

Returns an io::Error on failure.

#[must_use]pub fn is_empty(&self) -> bool[src]

Return true if ACL is empty.

#[must_use]pub fn is_posix(&self) -> bool[src]

Return true if ACL is a Posix.1e ACL on Linux or FreeBSD.

Trait Implementations

impl Drop for Acl[src]

Auto Trait Implementations

impl RefUnwindSafe for Acl

impl !Send for Acl

impl !Sync for Acl

impl Unpin for Acl

impl UnwindSafe for Acl

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, U> Into<U> for T where
    U: From<T>, 
[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.