pub struct MsFlags(/* private fields */);
Expand description
Used with mount
.
Implementations§
source§impl MsFlags
impl MsFlags
sourcepub const MS_SYNCHRONOUS: Self = _
pub const MS_SYNCHRONOUS: Self = _
Writes are synced at once
sourcepub const MS_REMOUNT: Self = _
pub const MS_REMOUNT: Self = _
Alter flags of a mounted FS
sourcepub const MS_MANDLOCK: Self = _
pub const MS_MANDLOCK: Self = _
Allow mandatory locks on a FS
sourcepub const MS_DIRSYNC: Self = _
pub const MS_DIRSYNC: Self = _
Directory modifications are synchronous
sourcepub const MS_NOATIME: Self = _
pub const MS_NOATIME: Self = _
Do not update access times
sourcepub const MS_NODIRATIME: Self = _
pub const MS_NODIRATIME: Self = _
Do not update directory access times
sourcepub const MS_POSIXACL: Self = _
pub const MS_POSIXACL: Self = _
VFS does not apply the umask
sourcepub const MS_UNBINDABLE: Self = _
pub const MS_UNBINDABLE: Self = _
The resulting mount cannot subsequently be bind mounted.
sourcepub const MS_PRIVATE: Self = _
pub const MS_PRIVATE: Self = _
Make this mount point private.
sourcepub const MS_SLAVE: Self = _
pub const MS_SLAVE: Self = _
If this is a shared mount point that is a member of a peer group that contains other members, convert it to a slave mount.
sourcepub const MS_RELATIME: Self = _
pub const MS_RELATIME: Self = _
When a file on this filesystem is accessed, update the file’s last access time (atime) only if the current value of atime is less than or equal to the file’s last modification time (mtime) or last status change time (ctime).
sourcepub const MS_KERNMOUNT: Self = _
👎Deprecated since 0.27.0: Should only be used in-kernel
pub const MS_KERNMOUNT: Self = _
Mount request came from within the kernel
sourcepub const MS_I_VERSION: Self = _
pub const MS_I_VERSION: Self = _
Update inode I_version field
sourcepub const MS_STRICTATIME: Self = _
pub const MS_STRICTATIME: Self = _
Always update the last access time (atime) when files on this filesystem are accessed.
sourcepub const MS_LAZYTIME: Self = _
pub const MS_LAZYTIME: Self = _
Reduce on-disk updates of inode timestamps (atime, mtime, ctime) by maintaining these changes only in memory.
pub const MS_ACTIVE: Self = _
pub const MS_NOUSER: Self = _
pub const MS_RMT_MASK: Self = _
pub const MS_MGC_VAL: Self = _
pub const MS_MGC_MSK: Self = _
source§impl MsFlags
impl MsFlags
sourcepub const fn bits(&self) -> c_ulong
pub const fn bits(&self) -> c_ulong
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: c_ulong) -> Option<Self>
pub const fn from_bits(bits: c_ulong) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: c_ulong) -> Self
pub const fn from_bits_truncate(bits: c_ulong) -> Self
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: c_ulong) -> Self
pub const fn from_bits_retain(bits: c_ulong) -> Self
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl MsFlags
impl MsFlags
sourcepub const fn iter(&self) -> Iter<MsFlags>
pub const fn iter(&self) -> Iter<MsFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
sourcepub const fn iter_names(&self) -> IterNames<MsFlags>
pub const fn iter_names(&self) -> IterNames<MsFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
source§impl BitAndAssign for MsFlags
impl BitAndAssign for MsFlags
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOrAssign for MsFlags
impl BitOrAssign for MsFlags
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXorAssign for MsFlags
impl BitXorAssign for MsFlags
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Extend<MsFlags> for MsFlags
impl Extend<MsFlags> for MsFlags
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for MsFlags
impl Flags for MsFlags
source§fn from_bits_retain(bits: c_ulong) -> MsFlags
fn from_bits_retain(bits: c_ulong) -> MsFlags
source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moresource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moresource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<MsFlags> for MsFlags
impl FromIterator<MsFlags> for MsFlags
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
source§impl IntoIterator for MsFlags
impl IntoIterator for MsFlags
source§impl Ord for MsFlags
impl Ord for MsFlags
source§impl PartialOrd for MsFlags
impl PartialOrd for MsFlags
source§impl Sub for MsFlags
impl Sub for MsFlags
source§impl SubAssign for MsFlags
impl SubAssign for MsFlags
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
impl Copy for MsFlags
impl Eq for MsFlags
impl StructuralPartialEq for MsFlags
Auto Trait Implementations§
impl Freeze for MsFlags
impl RefUnwindSafe for MsFlags
impl Send for MsFlags
impl Sync for MsFlags
impl Unpin for MsFlags
impl UnwindSafe for MsFlags
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)