pub struct MountOptions {
pub readonly: bool,
pub noexec: bool,
pub nosuid: bool,
pub nodev: bool,
}Expand description
Guest mount behavior shared by every volume mount kind.
Fields§
§readonly: boolWhether the mount is read-only.
Guest writes fail with the kernel’s read-only filesystem behavior. Virtiofs-backed mounts also reject writes on the host-side filesystem server as defense in depth.
noexec: boolWhether direct execution from the mount is disabled.
This prevents execve of binaries or scripts located on the mount. Interpreters can still read files from the mount, for example sh /mnt/script.sh, because the interpreter itself executes from a different filesystem.
nosuid: boolWhether setuid and setgid privilege elevation from files on the mount is ignored.
nodev: boolWhether device files on the mount are ignored.
Trait Implementations§
Source§impl Clone for MountOptions
impl Clone for MountOptions
Source§fn clone(&self) -> MountOptions
fn clone(&self) -> MountOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MountOptions
Source§impl Debug for MountOptions
impl Debug for MountOptions
Source§impl Default for MountOptions
impl Default for MountOptions
Source§fn default() -> MountOptions
fn default() -> MountOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MountOptionswhere
MountOptions: Default,
impl<'de> Deserialize<'de> for MountOptionswhere
MountOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MountOptions
Source§impl PartialEq for MountOptions
impl PartialEq for MountOptions
Source§fn eq(&self, other: &MountOptions) -> bool
fn eq(&self, other: &MountOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MountOptions
impl Serialize for MountOptions
impl StructuralPartialEq for MountOptions
Auto Trait Implementations§
impl Freeze for MountOptions
impl RefUnwindSafe for MountOptions
impl Send for MountOptions
impl Sync for MountOptions
impl Unpin for MountOptions
impl UnsafeUnpin for MountOptions
impl UnwindSafe for MountOptions
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