pub struct GuardOptions {
pub remove_on_drop: bool,
pub stop_on_drop: bool,
pub keep_on_panic: bool,
pub capture_logs: bool,
pub reuse_if_running: bool,
pub wait_for_ready: bool,
pub network: Option<String>,
pub create_network: bool,
pub remove_network_on_drop: bool,
pub stop_timeout: Option<Duration>,
}Expand description
Options for controlling container lifecycle behavior.
Fields§
§remove_on_drop: boolRemove container on drop (default: true)
stop_on_drop: boolStop container on drop (default: true)
keep_on_panic: boolKeep container running if test panics (default: false)
capture_logs: boolCapture container logs and print on panic (default: false)
reuse_if_running: boolReuse existing container if already running (default: false)
wait_for_ready: boolAutomatically wait for container to be ready after start (default: false)
network: Option<String>Network to attach the container to (default: None)
create_network: boolCreate the network if it doesn’t exist (default: true when network is set)
remove_network_on_drop: boolRemove the network on drop (default: false)
stop_timeout: Option<Duration>Timeout for stop operations during cleanup (default: None, uses Docker default)
Trait Implementations§
Source§impl Clone for GuardOptions
impl Clone for GuardOptions
Source§fn clone(&self) -> GuardOptions
fn clone(&self) -> GuardOptions
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 moreSource§impl Debug for GuardOptions
impl Debug for GuardOptions
Auto Trait Implementations§
impl Freeze for GuardOptions
impl RefUnwindSafe for GuardOptions
impl Send for GuardOptions
impl Sync for GuardOptions
impl Unpin for GuardOptions
impl UnwindSafe for GuardOptions
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