pub struct TestcontainerBackend { /* private fields */ }Expand description
Testcontainers backend for containerized execution
Implementations§
Source§impl TestcontainerBackend
impl TestcontainerBackend
Sourcepub fn with_policy(self, policy: Policy) -> Self
pub fn with_policy(self, policy: Policy) -> Self
Create with custom policy
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Create with custom execution timeout
Sourcepub fn with_startup_timeout(self, timeout: Duration) -> Self
pub fn with_startup_timeout(self, timeout: Duration) -> Self
Create with custom startup timeout
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the backend is running
Sourcepub fn with_volume(
self,
host_path: &str,
container_path: &str,
read_only: bool,
) -> Result<Self>
pub fn with_volume( self, host_path: &str, container_path: &str, read_only: bool, ) -> Result<Self>
Sourcepub fn with_volume_ro(
self,
host_path: &str,
container_path: &str,
) -> Result<Self>
pub fn with_volume_ro( self, host_path: &str, container_path: &str, ) -> Result<Self>
Add read-only volume mount
Convenience method for adding read-only mounts
Sourcepub fn with_volume_validator(self, validator: VolumeValidator) -> Self
pub fn with_volume_validator(self, validator: VolumeValidator) -> Self
Set volume validator with custom whitelist
Sourcepub fn volumes(&self) -> &[VolumeMount]
pub fn volumes(&self) -> &[VolumeMount]
Get volume mounts
Sourcepub fn with_memory_limit(self, limit_mb: u64) -> Self
pub fn with_memory_limit(self, limit_mb: u64) -> Self
Set memory limit in MB
Sourcepub fn with_cpu_limit(self, cpus: f64) -> Self
pub fn with_cpu_limit(self, cpus: f64) -> Self
Set CPU limit (number of CPUs)
Sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Check if testcontainers is available
pub fn otel_validation_enabled(&self) -> bool
Trait Implementations§
Source§impl Backend for TestcontainerBackend
impl Backend for TestcontainerBackend
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the backend is available
Source§fn supports_hermetic(&self) -> bool
fn supports_hermetic(&self) -> bool
Check if the backend supports hermetic execution
Source§fn supports_deterministic(&self) -> bool
fn supports_deterministic(&self) -> bool
Check if the backend supports deterministic execution
Source§impl Clone for TestcontainerBackend
impl Clone for TestcontainerBackend
Source§fn clone(&self) -> TestcontainerBackend
fn clone(&self) -> TestcontainerBackend
Returns a duplicate of the value. Read more
1.0.0 · 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 TestcontainerBackend
impl RefUnwindSafe for TestcontainerBackend
impl Send for TestcontainerBackend
impl Sync for TestcontainerBackend
impl Unpin for TestcontainerBackend
impl UnwindSafe for TestcontainerBackend
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,
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