Struct sys_mount::MountFlags [−]
pub struct MountFlags { /* fields omitted */ }
Flags which may be specified when mounting a file system.
Methods
impl MountFlags
impl MountFlags
pub const BIND: MountFlags
BIND: MountFlags = MountFlags{bits: MS_BIND,}
Perform a bind mount, making a file or a directory subtree visible at another point within a file system. Bind mounts may cross file system boundaries and span chroot(2) jails. The filesystemtype and data arguments are ignored. Up until Linux 2.6.26, mountflags was also ignored (the bind mount has the same mount options as the underlying mount point).
pub const DIRSYNC: MountFlags
DIRSYNC: MountFlags = MountFlags{bits: MS_DIRSYNC,}
Make directory changes on this file system synchronous.(This property can be obtained for individual directories or subtrees using chattr(1).)
pub const MANDLOCK: MountFlags
MANDLOCK: MountFlags = MountFlags{bits: MS_MANDLOCK,}
Permit mandatory locking on files in this file system. (Mandatory locking must still be enabled on a per-file basis, as described in fcntl(2).)
pub const MOVE: MountFlags
MOVE: MountFlags = MountFlags{bits: MS_MOVE,}
Move a subtree. source specifies an existing mount point and target specifies the new location. The move is atomic: at no point is the subtree unmounted. The filesystemtype, mountflags, and data arguments are ignored.
pub const NOATIME: MountFlags
NOATIME: MountFlags = MountFlags{bits: MS_NOATIME,}
Do not update access times for (all types of) files on this file system.
pub const NODEV: MountFlags
NODEV: MountFlags = MountFlags{bits: MS_NODEV,}
Do not allow access to devices (special files) on this file system.
pub const NODIRATIME: MountFlags
NODIRATIME: MountFlags = MountFlags{bits: MS_NODIRATIME,}
Do not update access times for directories on this file system. This flag provides a subset of the functionality provided by MS_NOATIME; that is, MS_NOATIME implies MS_NODIRATIME.
pub const NOEXEC: MountFlags
NOEXEC: MountFlags = MountFlags{bits: MS_NOEXEC,}
Do not allow programs to be executed from this file system.
pub const NOSUID: MountFlags
NOSUID: MountFlags = MountFlags{bits: MS_NOSUID,}
Do not honor set-user-ID and set-group-ID bits when executing programs from this file system.
pub const RDONLY: MountFlags
RDONLY: MountFlags = MountFlags{bits: MS_RDONLY,}
Mount file system read-only.
pub const RELATIME: MountFlags
RELATIME: MountFlags = MountFlags{bits: MS_RELATIME,}
When a file on this file system is accessed, only update the file's last access time (atime) 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). This option is useful for programs, such as mutt(1), that need to know when a file has been read since it was last modified. Since Linux 2.6.30, the kernel defaults to the behavior provided by this flag (unless MS_NOATIME was specified), and the MS_STRICTATIME flag is required to obtain traditional semantics. In addition, since Linux 2.6.30, the file's last access time is always updated if it is more than 1 day old.
pub const REMOUNT: MountFlags
REMOUNT: MountFlags = MountFlags{bits: MS_REMOUNT,}
Remount an existing mount. This allows you to change the mountflags and data of an existing mount without having to unmount and remount the file system. target should be the same value specified in the initial mount() call; source and filesystemtype are ignored.
The following mountflags can be changed: MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK; before kernel 2.6.16, the following could also be changed: MS_NOATIME and MS_NODIRATIME; and, additionally, before kernel 2.4.10, the following could also be changed: MS_NOSUID, MS_NODEV, MS_NOEXEC.
pub const SILENT: MountFlags
SILENT: MountFlags = MountFlags{bits: MS_SILENT,}
Suppress the display of certain (printk()) warning messages in the kernel log. This flag supersedes the misnamed and obsolete MS_VERBOSE flag (available since Linux 2.4.12), which has the same meaning.
pub const STRICTATIME: MountFlags
STRICTATIME: MountFlags = MountFlags{bits: MS_STRICTATIME,}
Always update the last access time (atime) when files on this file system are accessed. (This was the default behavior before Linux 2.6.30.) Specifying this flag overrides the effect of setting the MS_NOATIME and MS_RELATIME flags.
pub const SYNCHRONOUS: MountFlags
SYNCHRONOUS: MountFlags = MountFlags{bits: MS_SYNCHRONOUS,}
Make writes on this file system synchronous (as though the O_SYNC flag to open(2) was specified for all file opens to this file system).
pub fn empty() -> MountFlags
pub fn empty() -> MountFlags
Returns an empty set of flags.
pub fn all() -> MountFlags
pub fn all() -> MountFlags
Returns the set containing all flags.
pub fn bits(&self) -> u64
pub fn bits(&self) -> u64
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u64) -> Option<MountFlags>
pub fn from_bits(bits: u64) -> Option<MountFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u64) -> MountFlags
pub fn from_bits_truncate(bits: u64) -> MountFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: MountFlags) -> bool
pub fn intersects(&self, other: MountFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: MountFlags) -> bool
pub fn contains(&self, other: MountFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: MountFlags)
pub fn insert(&mut self, other: MountFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: MountFlags)
pub fn remove(&mut self, other: MountFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: MountFlags)
pub fn toggle(&mut self, other: MountFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: MountFlags, value: bool)
pub fn set(&mut self, other: MountFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for MountFlags
impl Copy for MountFlags
impl PartialEq for MountFlags
impl PartialEq for MountFlags
fn eq(&self, other: &MountFlags) -> bool
fn eq(&self, other: &MountFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MountFlags) -> bool
fn ne(&self, other: &MountFlags) -> bool
This method tests for !=
.
impl Eq for MountFlags
impl Eq for MountFlags
impl Clone for MountFlags
impl Clone for MountFlags
fn clone(&self) -> MountFlags
fn clone(&self) -> MountFlags
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for MountFlags
impl PartialOrd for MountFlags
fn partial_cmp(&self, other: &MountFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &MountFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &MountFlags) -> bool
fn lt(&self, other: &MountFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &MountFlags) -> bool
fn le(&self, other: &MountFlags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &MountFlags) -> bool
fn gt(&self, other: &MountFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &MountFlags) -> bool
fn ge(&self, other: &MountFlags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for MountFlags
impl Ord for MountFlags
fn cmp(&self, other: &MountFlags) -> Ordering
fn cmp(&self, other: &MountFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for MountFlags
impl Hash for MountFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for MountFlags
impl Debug for MountFlags
impl Binary for MountFlags
impl Binary for MountFlags
impl Octal for MountFlags
impl Octal for MountFlags
impl LowerHex for MountFlags
impl LowerHex for MountFlags
impl UpperHex for MountFlags
impl UpperHex for MountFlags
impl BitOr for MountFlags
impl BitOr for MountFlags
type Output = MountFlags
The resulting type after applying the |
operator.
fn bitor(self, other: MountFlags) -> MountFlags
fn bitor(self, other: MountFlags) -> MountFlags
Returns the union of the two sets of flags.
impl BitOrAssign for MountFlags
impl BitOrAssign for MountFlags
fn bitor_assign(&mut self, other: MountFlags)
fn bitor_assign(&mut self, other: MountFlags)
Adds the set of flags.
impl BitXor for MountFlags
impl BitXor for MountFlags
type Output = MountFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: MountFlags) -> MountFlags
fn bitxor(self, other: MountFlags) -> MountFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for MountFlags
impl BitXorAssign for MountFlags
fn bitxor_assign(&mut self, other: MountFlags)
fn bitxor_assign(&mut self, other: MountFlags)
Toggles the set of flags.
impl BitAnd for MountFlags
impl BitAnd for MountFlags
type Output = MountFlags
The resulting type after applying the &
operator.
fn bitand(self, other: MountFlags) -> MountFlags
fn bitand(self, other: MountFlags) -> MountFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for MountFlags
impl BitAndAssign for MountFlags
fn bitand_assign(&mut self, other: MountFlags)
fn bitand_assign(&mut self, other: MountFlags)
Disables all flags disabled in the set.
impl Sub for MountFlags
impl Sub for MountFlags
type Output = MountFlags
The resulting type after applying the -
operator.
fn sub(self, other: MountFlags) -> MountFlags
fn sub(self, other: MountFlags) -> MountFlags
Returns the set difference of the two sets of flags.
impl SubAssign for MountFlags
impl SubAssign for MountFlags
fn sub_assign(&mut self, other: MountFlags)
fn sub_assign(&mut self, other: MountFlags)
Disables all flags enabled in the set.
impl Not for MountFlags
impl Not for MountFlags
type Output = MountFlags
The resulting type after applying the !
operator.
fn not(self) -> MountFlags
fn not(self) -> MountFlags
Returns the complement of this set of flags.
impl Extend<MountFlags> for MountFlags
impl Extend<MountFlags> for MountFlags
fn extend<T: IntoIterator<Item = MountFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = MountFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<MountFlags> for MountFlags
impl FromIterator<MountFlags> for MountFlags
fn from_iter<T: IntoIterator<Item = MountFlags>>(iterator: T) -> MountFlags
fn from_iter<T: IntoIterator<Item = MountFlags>>(iterator: T) -> MountFlags
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for MountFlags
impl Send for MountFlags
impl Sync for MountFlags
impl Sync for MountFlags