Struct systemd_run::Mount
source · [−]pub struct Mount(_);
Expand description
The description of a mount.
Implementations
sourceimpl 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.
Auto Trait Implementations
impl RefUnwindSafe for Mount
impl Send for Mount
impl Sync for Mount
impl Unpin for Mount
impl UnwindSafe for Mount
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more