Struct exacl::Acl [−][src]
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]
pub fn write(&self, path: &Path, options: AclOption) -> Result<()>
[src]
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]
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
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]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,