[][src]Struct readable_perms::Permissions

#[repr(C)]pub struct Permissions {
    pub owner: Bit,
    pub group: Bit,
    pub other: Bit,
    // some fields omitted
}

Permissions struct in readable format

Fields

owner: Bit

The S_IRWXU mask.

In English

Read, write, and execute mask for owner of the file

group: Bit

The S_IRWXG mask.

In English

Read, write, and execute mask for members of the owner's group

other: Bit

The S_IRWXO mask.

In English

Read, write, and execute mask for anyone else

Implementations

impl Permissions[src]

pub const fn new() -> Self[src]

Create a new empty Permissions struct

impl Permissions[src]

pub const fn mask(&self) -> u32[src]

Convert into mode_t representation.

pub const fn from_mask(from: u32) -> Self[src]

Convert from mode_t representation.

pub const fn add_mask(self, class: User, bit: Bit) -> Self[src]

Consume and add a mask.

Usage

For builder pattern

pub const fn remove_mask(self, class: User, bit: Bit) -> Self[src]

Consume and remove a mask.

Usage

For builder pattern

pub const fn has_mask(&self, class: User, bit: Bit) -> bool[src]

Returns true if the specified mode mask is all present

Trait Implementations

impl AsRef<Permissions> for u32[src]

impl AsRef<Permissions> for Permissions[src]

impl Borrow<Permissions> for u32[src]

impl Clone for Permissions[src]

impl Copy for Permissions[src]

impl Debug for Permissions[src]

impl Default for Permissions[src]

impl Display for Permissions[src]

impl Eq for Permissions[src]

impl From<Permissions> for u32[src]

impl From<u32> for Permissions[src]

impl Hash for Permissions[src]

impl Ord for Permissions[src]

impl PartialEq<Permissions> for Permissions[src]

impl PartialEq<Permissions> for u32[src]

impl PartialEq<u32> for Permissions[src]

impl PartialOrd<Permissions> for Permissions[src]

impl StructuralEq for Permissions[src]

impl StructuralPartialEq for Permissions[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.