pub struct DockerService<B> {
config: B,
}Expand description
A service that runs a docker container with the given configuration.
Fields§
§config: BImplementations§
Source§impl<B> DockerService<B>where
B: DockerServiceConfig,
impl<B> DockerService<B>where
B: DockerServiceConfig,
pub fn new(config: B) -> Self
Sourcefn check_image_exists(&self) -> bool
fn check_image_exists(&self) -> bool
Run docker image inspect <image> to check if the image exists locally.
docker run --pull=missing does the same thing, but as we split the pull and run
into two commands while pull does not provide such an option, we need to check
the image existence manually.
fn docker_pull(&self) -> Command
fn docker_run(&self) -> Result<Command>
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for DockerService<B>where
B: Freeze,
impl<B> RefUnwindSafe for DockerService<B>where
B: RefUnwindSafe,
impl<B> Send for DockerService<B>where
B: Send,
impl<B> Sync for DockerService<B>where
B: Sync,
impl<B> Unpin for DockerService<B>where
B: Unpin,
impl<B> UnwindSafe for DockerService<B>where
B: UnwindSafe,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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