[][src]Struct acl_rs::Acl

pub struct Acl { /* fields omitted */ }

Methods

impl Acl[src]

pub fn init(count: i32) -> Result<Self, AclError>[src]

pub fn from_text(text: &str) -> Result<Self, AclError>[src]

pub fn to_text(&self) -> Result<Vec<u8>, AclError>[src]

pub fn for_fd(fd: i32) -> Result<Self, AclError>[src]

pub fn set_for_fd(&self, fd: i32) -> Result<(), AclError>[src]

pub fn for_file(file_path: &PathBuf, typ: &AclType) -> Result<Self, AclError>[src]

pub fn set_for_file(
    &self,
    file_path: &PathBuf,
    typ: &AclType
) -> Result<(), AclError>
[src]

pub fn get_entry(&self, id: &EntryId) -> Result<Option<AclEntry>, AclError>[src]

pub fn create_entry(&mut self) -> Result<AclEntry, AclError>[src]

This is dangerous. The lifetime of all permsets and entries is bound to the liftime of the Acls raw_pointer. Since this operation might move the Acl to a bigger allocation this might introduce unsoundness.

This should be prevented since we check in each call if is_valid is still true but it is pretty hacky.

pub fn delete_entry(
    &mut self,
    entry: AclEntry
) -> Result<(), (AclEntry, AclError)>
[src]

consumes the entry but returns it if an error occurs

pub fn free(self) -> Result<(), (Self, AclError)>[src]

Use with care. Acl may not be used after this. This will also be called when dropped so maybe just let drop handle this

pub fn calc_mask(&mut self) -> Result<(), AclError>[src]

pub fn dup(&self) -> Result<Acl, AclError>[src]

pub fn size(&self) -> Result<usize, AclError>[src]

pub fn valid(&self) -> Result<Option<Errno>, AclError>[src]

Trait Implementations

impl Debug for Acl[src]

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.