pub struct ServiceMock<M: Message> {
pub mbox: MsgMailbox<M>,
/* private fields */
}Expand description
The ServiceMock allows you to mock a service processing messages of a specific type.
Fields§
§mbox: MsgMailbox<M>Implementations§
Source§impl<M: Message> ServiceMock<M>
impl<M: Message> ServiceMock<M>
pub fn new() -> Self
pub fn new_bounded(channel_size: usize) -> Self
pub fn take_messages(&mut self) -> Vec<M>
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for ServiceMock<M>
impl<M> !RefUnwindSafe for ServiceMock<M>
impl<M> Send for ServiceMock<M>
impl<M> !Sync for ServiceMock<M>
impl<M> Unpin for ServiceMock<M>
impl<M> !UnwindSafe for ServiceMock<M>
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