pub struct Mount(/* private fields */);
Expand description
The description of a mount.
Implementations§
Source§impl Mount
impl Mount
Sourcepub fn bind<T: AsRef<str>>(src: T) -> Self
pub fn bind<T: AsRef<str>>(src: T) -> Self
Create a new bind mount.
Read BindPaths
and BindReadOnlyPaths
in
systemd.exec(5) for details.
This setting is not available if the feature systemd_233
is
disabled.
Sourcepub fn tmpfs() -> Self
pub fn tmpfs() -> Self
Create a tmpfs mount.
Read TemporaryFileSystem
in systemd.exec(5)
for details.
This setting is not available if the feature systemd_238
is
disabled.
Sourcepub fn normal<T: AsRef<str>>(src: T) -> Self
pub fn normal<T: AsRef<str>>(src: T) -> Self
Create a normal mount.
Read MountImages
in systemd.exec(5) for
details.
This setting is not available if the feature systemd_247
is
disabled.
Sourcepub fn recursive(self) -> Self
pub fn recursive(self) -> Self
Make the Mount recursive. It only makes a difference for a bind mount.
Sourcepub fn opt<T: AsRef<str>>(self, option: T) -> Option<Self>
pub fn opt<T: AsRef<str>>(self, option: T) -> Option<Self>
Append a mount option. If the option contains a comma (,
), or
it is ro
, rw
, or empty, or it’s applied for a bind mount,
None will be returned. But the option will not be validated
further.
For rw
, use Self::writable instead.
Sourcepub fn ignore_nonexist(self) -> Self
pub fn ignore_nonexist(self) -> Self
Ignore the mount if the source does not exist. This does not make any difference for tmpfs mounts.