[][src]Struct umask::Mode

pub struct Mode { /* fields omitted */ }

Implementations

impl Mode[src]

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

build a mode with absolutely no permission

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

build a mode with all permissions given to everybody

pub fn try_from(path: &Path) -> Result<Self, Error>[src]

return the mode for the given path. On non unix platforms, return Mode::all()

pub const fn is_exe(self) -> bool[src]

finds if the mode indicates an executable file

pub const fn has(self, other: Self) -> bool[src]

indicates whether the passed class/permissions are all present in self

pub const fn with_class_perm(self, class: Class, perm: Permission) -> Self[src]

return a new mode, with the permission added for the class (does nothing if the permission is already given to that class)

pub const fn without_class_perm(self, class: Class, perm: Permission) -> Self[src]

return a new mode, with the permission removed for the class (does nothing if the permission is already given to that class)

pub const fn with(self, other: Mode) -> Self[src]

add the class/permissions of the other mode

pub const fn without(self, other: Mode) -> Self[src]

remove the class/permissions of the other mode

Trait Implementations

impl BitAnd<Mode> for Mode[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAndAssign<Mode> for Mode[src]

impl BitOr<Mode> for Mode[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<Mode> for Mode[src]

impl Clone for Mode[src]

impl Copy for Mode[src]

impl Debug for Mode[src]

impl Default for Mode[src]

impl Display for Mode[src]

impl Eq for Mode[src]

impl From<u32> for Mode[src]

impl Not for Mode[src]

type Output = Self

The resulting type after applying the ! operator.

impl PartialEq<Mode> for Mode[src]

impl StructuralEq for Mode[src]

impl StructuralPartialEq for Mode[src]

Auto Trait Implementations

impl RefUnwindSafe for Mode

impl Send for Mode

impl Sync for Mode

impl Unpin for Mode

impl UnwindSafe for Mode

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.