pub struct TestContainerSuite { /* private fields */ }Expand description
Identity of a test suite that owns shared containers.
The suite name keeps containers from different products apart, while a hash of the current working directory isolates parallel checkouts of the same product on one machine. Cargo runs test binaries with the package directory as working directory, so each checkout gets its own instance id without any compile-time env tricks.
Implementations§
Source§impl TestContainerSuite
impl TestContainerSuite
Sourcepub fn new(name: &str) -> Self
pub fn new(name: &str) -> Self
Creates a suite rooted at <temp dir>/aster-testcontainers-<name>.
The name becomes part of container names and lock file paths, so it must be non-empty
ASCII alphanumeric or -.
Sourcepub fn state_dir(&self) -> &Path
pub fn state_dir(&self) -> &Path
Returns the directory holding lock files and state JSON for this suite.
Sourcepub fn container_name(&self, service: &str) -> String
pub fn container_name(&self, service: &str) -> String
Returns the shared container name for a service.
Trait Implementations§
Source§impl Clone for TestContainerSuite
impl Clone for TestContainerSuite
Source§fn clone(&self) -> TestContainerSuite
fn clone(&self) -> TestContainerSuite
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestContainerSuite
impl RefUnwindSafe for TestContainerSuite
impl Send for TestContainerSuite
impl Sync for TestContainerSuite
impl Unpin for TestContainerSuite
impl UnsafeUnpin for TestContainerSuite
impl UnwindSafe for TestContainerSuite
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].