[−][src]Struct acl_rs::Acl
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]
&self,
file_path: &PathBuf,
typ: &AclType
) -> Result<(), AclError>
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]
&mut self,
entry: AclEntry
) -> Result<(), (AclEntry, AclError)>
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
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,
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.
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>,