pub struct MountPointBuilder { /* private fields */ }
Expand description
Builder for MountPoint
.
Implementations§
Source§impl MountPointBuilder
impl MountPointBuilder
Sourcepub fn source<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn source<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
Source is the source path of the mount.
E.g. mount --bind /foo /bar
, /foo
is the Source
.
Sourcepub fn destination<VALUE: Into<Option<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn destination<VALUE: Into<Option<String>>>( &mut self, value: VALUE, ) -> &mut Self
Destination is the path relative to the container root (/
) to the mount point
It is where the Source
is mounted to.
Sourcepub fn rw<VALUE: Into<Option<bool>>>(&mut self, value: VALUE) -> &mut Self
pub fn rw<VALUE: Into<Option<bool>>>(&mut self, value: VALUE) -> &mut Self
RW is set to true when the mountpoint should be mounted as read-write.
Sourcepub fn name<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
Name is the name reference to the underlying data defined by Source
e.g., the volume name.
Sourcepub fn driver<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn driver<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
Driver is the volume driver used to create the volume (if it is a volume).
pub fn mount_type<VALUE: Into<Option<MountType>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn mode<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn mode<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
mode is the comma separated list of options supplied by the user when creating the bind/volume mount. Note mode is not used on Windows
Sourcepub fn propagation<VALUE: Into<Option<MountPropagation>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn propagation<VALUE: Into<Option<MountPropagation>>>( &mut self, value: VALUE, ) -> &mut Self
Propagation describes how the mounts are propagated from the host into the mount point, and vice-versa. See https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt Note Propagation is not used on Windows
Sourcepub fn id<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn id<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
ID is the opaque ID used to pass to the volume driver.
This should be set by calls to Mount
and unset by calls to Unmount
Sourcepub fn spec<VALUE: Into<Option<Mount>>>(&mut self, value: VALUE) -> &mut Self
pub fn spec<VALUE: Into<Option<Mount>>>(&mut self, value: VALUE) -> &mut Self
Spec is a copy of the API request that created this mount.
Sourcepub fn skip_mountpoint_creation<VALUE: Into<Option<bool>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn skip_mountpoint_creation<VALUE: Into<Option<bool>>>( &mut self, value: VALUE, ) -> &mut Self
Some bind mounts should not be automatically created. (Some are auto-created for backwards-compatibility) This is checked on the API but setting this here prevents race conditions. where a bind dir existed during validation was removed before reaching the setup code.
Trait Implementations§
Source§impl Clone for MountPointBuilder
impl Clone for MountPointBuilder
Source§fn clone(&self) -> MountPointBuilder
fn clone(&self) -> MountPointBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more