Struct dockertest::waitfor::MessageWait
source · pub struct MessageWait {
pub message: String,
pub source: MessageSource,
pub timeout: u16,
}
Expand description
The MessageWait WaitFor
implementation for containers.
This variant will wait until the message appears in the requested source.
Fields§
§message: String
The message to be contained in source.
source: MessageSource
The source to listen for message.
timeout: u16
Number of seconds to wait for message. Times out with an error on expire.
Trait Implementations§
source§impl Clone for MessageWait
impl Clone for MessageWait
source§fn clone(&self) -> MessageWait
fn clone(&self) -> MessageWait
Returns a copy 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 MessageWait
impl Debug for MessageWait
source§impl WaitFor for MessageWait
impl WaitFor for MessageWait
source§fn wait_for_ready<'life0, 'async_trait>(
&'life0 self,
container: PendingContainer,
) -> Pin<Box<dyn Future<Output = Result<OperationalContainer, DockerTestError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_ready<'life0, 'async_trait>(
&'life0 self,
container: PendingContainer,
) -> Pin<Box<dyn Future<Output = Result<OperationalContainer, DockerTestError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Method implementation should return a future that resolves once the condition
described by the implementing structure is fulfilled. Once this successfully resolves,
the container is marked as ready.
source§fn expected_state(&self) -> ContainerState
fn expected_state(&self) -> ContainerState
What state the container is expected to be in after completing the
wait_for_ready
method,
defaulting to the ContainerState::Running
state.
NOTE: This is only relevant for the container state api on ‘OperationalContainer’ (start, stop,
kill) as we deny certain operations based on the assumed container state.Auto Trait Implementations§
impl Freeze for MessageWait
impl RefUnwindSafe for MessageWait
impl Send for MessageWait
impl Sync for MessageWait
impl Unpin for MessageWait
impl UnwindSafe for MessageWait
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)