Struct sys_mount::MountFlags[]

pub struct MountFlags { /* fields omitted */ }

Flags which may be specified when mounting a file system.

Methods

impl 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).

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).)

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).)

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.

NOATIME: MountFlags = MountFlags{bits: MS_NOATIME,}

Do not update access times for (all types of) files on this file system.

NODEV: MountFlags = MountFlags{bits: MS_NODEV,}

Do not allow access to devices (special files) on this file system.

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.

NOEXEC: MountFlags = MountFlags{bits: MS_NOEXEC,}

Do not allow programs to be executed from this file system.

NOSUID: MountFlags = MountFlags{bits: MS_NOSUID,}

Do not honor set-user-ID and set-group-ID bits when executing programs from this file system.

RDONLY: MountFlags = MountFlags{bits: MS_RDONLY,}

Mount file system read-only.

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.

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.

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.

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.

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).

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true all of the flags in other are contained within self.

Inserts the specified flags in-place.

Removes the specified flags in-place.

Toggles the specified flags in-place.

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Copy for MountFlags

impl PartialEq for MountFlags

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for MountFlags

impl Clone for MountFlags

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialOrd for MountFlags

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for MountFlags

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for MountFlags

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for MountFlags

Formats the value using the given formatter. Read more

impl Binary for MountFlags

Formats the value using the given formatter.

impl Octal for MountFlags

Formats the value using the given formatter.

impl LowerHex for MountFlags

Formats the value using the given formatter.

impl UpperHex for MountFlags

Formats the value using the given formatter.

impl BitOr for MountFlags

The resulting type after applying the | operator.

Returns the union of the two sets of flags.

impl BitOrAssign for MountFlags

Adds the set of flags.

impl BitXor for MountFlags

The resulting type after applying the ^ operator.

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign for MountFlags

Toggles the set of flags.

impl BitAnd for MountFlags

The resulting type after applying the & operator.

Returns the intersection between the two sets of flags.

impl BitAndAssign for MountFlags

Disables all flags disabled in the set.

impl Sub for MountFlags

The resulting type after applying the - operator.

Returns the set difference of the two sets of flags.

impl SubAssign for MountFlags

Disables all flags enabled in the set.

impl Not for MountFlags

The resulting type after applying the ! operator.

Returns the complement of this set of flags.

impl Extend<MountFlags> for MountFlags

Extends a collection with the contents of an iterator. Read more

impl FromIterator<MountFlags> for MountFlags

Creates a value from an iterator. Read more

Auto Trait Implementations

impl Send for MountFlags

impl Sync for MountFlags