pub struct SandboxMessages<'a> { /* private fields */ }Expand description
Reads what a sandbox trapped.
Implementations§
Source§impl SandboxMessages<'_>
impl SandboxMessages<'_>
pub async fn list( &self, sandbox_id: &str, params: &ListSandboxMessagesParams, ) -> Result<Vec<SandboxMessageSummary>>
pub async fn get( &self, sandbox_id: &str, message_id: &str, ) -> Result<SandboxMessage>
Sourcepub async fn raw(&self, sandbox_id: &str, message_id: &str) -> Result<String>
pub async fn raw(&self, sandbox_id: &str, message_id: &str) -> Result<String>
The message’s raw MIME source.
pub async fn remove(&self, sandbox_id: &str, message_id: &str) -> Result<()>
Sourcepub async fn clear(&self, sandbox_id: &str) -> Result<u64>
pub async fn clear(&self, sandbox_id: &str) -> Result<u64>
Empty the sandbox; returns how many messages went.
Sourcepub async fn mark_all_read(&self, sandbox_id: &str) -> Result<u64>
pub async fn mark_all_read(&self, sandbox_id: &str) -> Result<u64>
Mark every message read; returns how many changed.
Sourcepub async fn wait_for<F>(
&self,
sandbox_id: &str,
matches: F,
timeout: Duration,
interval: Duration,
) -> Result<SandboxMessage>
pub async fn wait_for<F>( &self, sandbox_id: &str, matches: F, timeout: Duration, interval: Duration, ) -> Result<SandboxMessage>
Poll every interval until a message arrives that matches accepts,
then return it in full. Handy in end-to-end tests. After timeout the
error’s name is timeout.
Sourcepub async fn wait_for_next(
&self,
sandbox_id: &str,
timeout: Duration,
) -> Result<SandboxMessage>
pub async fn wait_for_next( &self, sandbox_id: &str, timeout: Duration, ) -> Result<SandboxMessage>
SandboxMessages::wait_for for any message trapped after the call started.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SandboxMessages<'a>
impl<'a> !UnwindSafe for SandboxMessages<'a>
impl<'a> Freeze for SandboxMessages<'a>
impl<'a> Send for SandboxMessages<'a>
impl<'a> Sync for SandboxMessages<'a>
impl<'a> Unpin for SandboxMessages<'a>
impl<'a> UnsafeUnpin for SandboxMessages<'a>
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