Enum MountType

Source
pub enum MountType {
    Regular,
    Bind {
        source_mount_node: Arc<MountNode>,
        source_relative_path: String,
        bind_type: BindType,
    },
    Overlay {
        lower_layers: Vec<String>,
        upper_layer: String,
        work_dir: String,
    },
}
Expand description

Mount type classification for different mount strategies

This enum defines the various mount types supported by the VFS system, each with different behaviors and resource handling approaches.

Variants§

§

Regular

Regular filesystem mount

Standard mount where the filesystem directly handles all operations at the mount point. This is the most common mount type.

§

Bind

Bind mount - maps one directory tree to another location

Bind mounts allow the same filesystem content to be accessible from multiple mount points. They support:

  • Cross-VFS sharing for container resource sharing
  • Read-only restrictions for security
  • Shared propagation for namespace management

Fields

§source_mount_node: Arc<MountNode>

Source mount node that provides the actual filesystem

§source_relative_path: String

Relative path within the source filesystem

§bind_type: BindType

Type of bind mount (read-only, read-write, shared)

§

Overlay

Overlay filesystem mount

Combines multiple filesystem layers into a unified view, typically used for container images and copy-on-write scenarios.

Fields

§lower_layers: Vec<String>

Lower filesystem layers (read-only)

§upper_layer: String

Upper layer for writes

§work_dir: String

Working directory for overlay operations

Trait Implementations§

Source§

impl Clone for MountType

Source§

fn clone(&self) -> MountType

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for MountType

§

impl !RefUnwindSafe for MountType

§

impl Send for MountType

§

impl Sync for MountType

§

impl Unpin for MountType

§

impl !UnwindSafe for MountType

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.