pub struct MockNotifier<'notifier> { /* private fields */ }
Expand description
A mocked version of the Notifier
, that will interact directly with a ThreadStatuses
without the use of a thread
or the Runtime
.
Implementations§
Source§impl<'notifier> MockNotifier<'notifier>
impl<'notifier> MockNotifier<'notifier>
Sourcepub const fn new(threadable_statuses: &'notifier ThreadStatuses) -> Self
pub const fn new(threadable_statuses: &'notifier ThreadStatuses) -> Self
Create a new instance of a MockNotifier
.
Sourcepub fn register_thread(&mut self, thread_name: &str, status: Status)
pub fn register_thread(&mut self, thread_name: &str, status: Status)
Register a thread by name and status. This does not create a thread.
Trait Implementations§
Auto Trait Implementations§
impl<'notifier> Freeze for MockNotifier<'notifier>
impl<'notifier> !RefUnwindSafe for MockNotifier<'notifier>
impl<'notifier> Send for MockNotifier<'notifier>
impl<'notifier> Sync for MockNotifier<'notifier>
impl<'notifier> Unpin for MockNotifier<'notifier>
impl<'notifier> !UnwindSafe for MockNotifier<'notifier>
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