Struct file_mode::Protection [−][src]
Protection bits for user’s access to a file.
Implementations
impl Protection
[src]
pub fn empty() -> Protection
[src]
Constructs Protection with all bits forgotten.
pub fn all_set() -> Protection
[src]
Constructs Protection with all bits set.
pub fn all_clear() -> Protection
[src]
Constructs Protection with all bits cleared.
pub fn from_mode_user(mode: &Mode, user: User) -> Protection
[src]
Constructs Protection representing User access to the file described by Mode.
pub fn is_read_set(&self) -> bool
[src]
Returns true if read permission bit is set.
pub fn is_write_set(&self) -> bool
[src]
Returns true if write permission bit is set.
pub fn is_execute_set(&self) -> bool
[src]
Returns true if execute permission bit is set.
pub fn is_search_set(&self) -> bool
[src]
Returns true if execute or search permission bits are set.
pub fn with_set(self, bit: ProtectionBit) -> Protection
[src]
Returns self with given ProtectionBit set.
pub fn with_cleared(self, bit: ProtectionBit) -> Protection
[src]
Returns self with given ProtectionBit cleared.
pub fn with_forgotten(self, bit: ProtectionBit) -> Protection
[src]
Returns self with given ProtectionBit value forgotten.
pub fn set(&mut self, bit: ProtectionBit)
[src]
Sets given ProtectionBit.
pub fn clear(&mut self, bit: ProtectionBit)
[src]
Clears given ProtectionBit.
pub fn forget(&mut self, bit: ProtectionBit)
[src]
Forgets the value of given ProtectionBit.
pub fn for_user(&self, user: User) -> Mode
[src]
Trait Implementations
impl Clone for Protection
[src]
fn clone(&self) -> Protection
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Protection
[src]
impl From<ProtectionBit> for Protection
[src]
fn from(bit: ProtectionBit) -> Protection
[src]
Auto Trait Implementations
impl RefUnwindSafe for Protection
impl Send for Protection
impl Sync for Protection
impl Unpin for Protection
impl UnwindSafe for Protection
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,