[][src]Struct sys_mount::MountFlags

pub struct MountFlags { /* fields omitted */ }

Flags which may be specified when mounting a file system.

Implementations

impl MountFlags[src]

pub const BIND: MountFlags[src]

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[src]

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[src]

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[src]

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[src]

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

pub const NODEV: MountFlags[src]

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

pub const NODIRATIME: MountFlags[src]

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[src]

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

pub const NOSUID: MountFlags[src]

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

pub const RDONLY: MountFlags[src]

Mount file system read-only.

pub const RELATIME: MountFlags[src]

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[src]

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[src]

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[src]

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[src]

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 const fn empty() -> MountFlags[src]

Returns an empty set of flags

pub const fn all() -> MountFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> c_ulong[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: c_ulong) -> Option<MountFlags>[src]

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

pub const fn from_bits_truncate(bits: c_ulong) -> MountFlags[src]

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

pub const unsafe fn from_bits_unchecked(bits: c_ulong) -> MountFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: MountFlags) -> bool[src]

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

pub const fn contains(&self, other: MountFlags) -> bool[src]

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

pub fn insert(&mut self, other: MountFlags)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: MountFlags)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: MountFlags)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: MountFlags, value: bool)[src]

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

Trait Implementations

impl Binary for MountFlags[src]

impl BitAnd<MountFlags> for MountFlags[src]

type Output = MountFlags

The resulting type after applying the & operator.

fn bitand(self, other: MountFlags) -> MountFlags[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<MountFlags> for MountFlags[src]

fn bitand_assign(&mut self, other: MountFlags)[src]

Disables all flags disabled in the set.

impl BitOr<MountFlags> for MountFlags[src]

type Output = MountFlags

The resulting type after applying the | operator.

fn bitor(self, other: MountFlags) -> MountFlags[src]

Returns the union of the two sets of flags.

impl BitOrAssign<MountFlags> for MountFlags[src]

fn bitor_assign(&mut self, other: MountFlags)[src]

Adds the set of flags.

impl BitXor<MountFlags> for MountFlags[src]

type Output = MountFlags

The resulting type after applying the ^ operator.

fn bitxor(self, other: MountFlags) -> MountFlags[src]

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

impl BitXorAssign<MountFlags> for MountFlags[src]

fn bitxor_assign(&mut self, other: MountFlags)[src]

Toggles the set of flags.

impl Clone for MountFlags[src]

impl Copy for MountFlags[src]

impl Debug for MountFlags[src]

impl Eq for MountFlags[src]

impl Extend<MountFlags> for MountFlags[src]

impl FromIterator<MountFlags> for MountFlags[src]

impl Hash for MountFlags[src]

impl LowerHex for MountFlags[src]

impl Not for MountFlags[src]

type Output = MountFlags

The resulting type after applying the ! operator.

fn not(self) -> MountFlags[src]

Returns the complement of this set of flags.

impl Octal for MountFlags[src]

impl Ord for MountFlags[src]

impl PartialEq<MountFlags> for MountFlags[src]

impl PartialOrd<MountFlags> for MountFlags[src]

impl StructuralEq for MountFlags[src]

impl StructuralPartialEq for MountFlags[src]

impl Sub<MountFlags> for MountFlags[src]

type Output = MountFlags

The resulting type after applying the - operator.

fn sub(self, other: MountFlags) -> MountFlags[src]

Returns the set difference of the two sets of flags.

impl SubAssign<MountFlags> for MountFlags[src]

fn sub_assign(&mut self, other: MountFlags)[src]

Disables all flags enabled in the set.

impl UpperHex for MountFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.