pub struct Special(/* private fields */);Expand description
The special permissions of a file or directory.
Implementations§
Source§impl Special
impl Special
Sourcepub const SetUserIdentifier: Self
pub const SetUserIdentifier: Self
Set user identifier.
Sourcepub const SetGroupIdentifier: Self
pub const SetGroupIdentifier: Self
Set group identifier.
pub const None: Self
pub const All: Self
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Checks if the flag set contains the specified flag(s)
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Checks if the flag set contains any of the specified flag(s)
Sourcepub const fn set(self, other: Self, value: bool) -> Self
pub const fn set(self, other: Self, value: bool) -> Self
Sets or clears the specified flag(s) based on the passed value
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of the two flag sets
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the two flag sets
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the two flag sets
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of the flag set
Sourcepub const fn bits_used() -> u8
pub const fn bits_used() -> u8
Returns the number of bits required to represent all defined flags
Sourcepub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_bits_truncate(bits: u8) -> Self
Creates a flag set from raw bits, truncating any unknown bits
Sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> Self
pub const unsafe fn from_bits_unchecked(bits: u8) -> Self
Creates a flag set from raw bits without checking validity
Source§impl Special
impl Special
pub const NONE: Self
pub const STICKY: Self
pub const SET_USER_IDENTIFIER: Self
pub const SET_GROUP_IDENTIFIER: Self
pub fn new(sticky: bool, set_gid: bool, set_uid: bool) -> Self
pub fn set_sticky(self, sticky: bool) -> Self
pub fn set_set_group_identifier(self, set_gid: bool) -> Self
pub fn set_set_user_identifier(self, set_uid: bool) -> Self
pub const fn get_sticky(&self) -> bool
pub const fn get_set_group_identifier(&self) -> bool
pub const fn get_set_user_identifier(&self) -> bool
pub const fn to_unix(&self) -> u8
pub fn from_unix(unix: u8) -> Option<Self>
Trait Implementations§
Source§impl BitAndAssign for Special
impl BitAndAssign for Special
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign for Special
impl BitOrAssign for Special
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign for Special
impl BitXorAssign for Special
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^= operation. Read moreSource§impl SubAssign for Special
impl SubAssign for Special
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Copy for Special
impl Eq for Special
impl StructuralPartialEq for Special
Auto Trait Implementations§
impl Freeze for Special
impl RefUnwindSafe for Special
impl Send for Special
impl Sync for Special
impl Unpin for Special
impl UnwindSafe for Special
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more