pub struct MockEndpointInner {
pub name: String,
/* private fields */
}Expand description
The actual data behind a mock endpoint. Shared across all MockEndpoint
instances created with the same name via MockComponent.
Use get_received_exchanges and assert_exchange_count to inspect
recorded exchanges in tests.
Fields§
§name: StringImplementations§
Source§impl MockEndpointInner
impl MockEndpointInner
Sourcepub async fn get_received_exchanges(&self) -> Vec<Exchange>
pub async fn get_received_exchanges(&self) -> Vec<Exchange>
Return a snapshot of all exchanges received so far.
Sourcepub async fn assert_exchange_count(&self, expected: usize)
pub async fn assert_exchange_count(&self, expected: usize)
Assert that exactly expected exchanges have been received.
§Panics
Panics if the count does not match.
Auto Trait Implementations§
impl Freeze for MockEndpointInner
impl !RefUnwindSafe for MockEndpointInner
impl Send for MockEndpointInner
impl Sync for MockEndpointInner
impl Unpin for MockEndpointInner
impl UnsafeUnpin for MockEndpointInner
impl !UnwindSafe for MockEndpointInner
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