pub struct ContainerMount {
pub mount: Mount,
pub temp_path: Option<TempPathWithString>,
}Expand description
A mount for a container.
Fields§
§mount: MountThe mount for the container.
temp_path: Option<TempPathWithString>Temporary path on the host. Used if the Docker host is local.
Implementations§
Source§impl ContainerMount
impl ContainerMount
Sourcepub fn new(container_path: &str) -> Result<Self>
pub fn new(container_path: &str) -> Result<Self>
Creates a mount for the container with the given path.
If we’re using a remote Docker host (set by USING_REMOTE_DOCKER_HOST_KEY),
will use Mount::tmpfs_mount.
This assumes the remote Docker host is running on Linux (and will fail otherwise).
Otherwise, will use Mount::bind_mount.
§Errors
Returns anyhow::Error if the Docker host is local,
and we can’t create a temporary path on the host.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContainerMount
impl RefUnwindSafe for ContainerMount
impl Send for ContainerMount
impl Sync for ContainerMount
impl Unpin for ContainerMount
impl UnsafeUnpin for ContainerMount
impl UnwindSafe for ContainerMount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request