Skip to main content

AsyncMock

Trait AsyncMock 

Source
pub trait AsyncMock: Mock {
    // Required method
    async fn verify_async(&self) -> TestingResult<()>;
}
Expand description

异步 Mock 行为 trait

Required Methods§

Source

async fn verify_async(&self) -> TestingResult<()>

异步验证期望

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Clone + Send + Sync + 'static> AsyncMock for MockFn<T>