pub struct MountBuilder { /* private fields */ }Expand description
Builder for Mount.
Implementations§
Source§impl MountBuilder
impl MountBuilder
Sourcepub fn destination<VALUE: Into<PathBuf>>(self, value: VALUE) -> Self
pub fn destination<VALUE: Into<PathBuf>>(self, value: VALUE) -> Self
Destination is the absolute path where the mount will be placed in the container.
Sourcepub fn source<VALUE: Into<PathBuf>>(self, value: VALUE) -> Self
pub fn source<VALUE: Into<PathBuf>>(self, value: VALUE) -> Self
Source specifies the source path of the mount.
Sourcepub fn options<VALUE: Into<Vec<String>>>(self, value: VALUE) -> Self
pub fn options<VALUE: Into<Vec<String>>>(self, value: VALUE) -> Self
Options are fstab style mount options.
Sourcepub fn uid_mappings<VALUE: Into<Vec<LinuxIdMapping>>>(
self,
value: VALUE,
) -> Self
pub fn uid_mappings<VALUE: Into<Vec<LinuxIdMapping>>>( self, value: VALUE, ) -> Self
UID mappings for ID-mapped mounts (Linux 5.12+).
Specifies how to map UIDs from the source filesystem to the destination mount point.
This allows changing file ownership without calling chown.
Important: If specified, gid_mappings MUST also be specified.
The mount options SHOULD include “idmap” or “ridmap”.
See: https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-mounts
Sourcepub fn gid_mappings<VALUE: Into<Vec<LinuxIdMapping>>>(
self,
value: VALUE,
) -> Self
pub fn gid_mappings<VALUE: Into<Vec<LinuxIdMapping>>>( self, value: VALUE, ) -> Self
GID mappings for ID-mapped mounts (Linux 5.12+).
Specifies how to map GIDs from the source filesystem to the destination mount point. This allows changing file group ownership without calling chown.
Important: If specified, uid_mappings MUST also be specified.
The mount options SHOULD include "idmap" or "ridmap".
See: https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-mounts