pub struct MockReceivedEvent<E> {
event: E,
acked: Arc<Mutex<bool>>,
context: Context,
}Expand description
A received event wrapper for use in unit tests.
Tracks whether ack was called, so tests can assert
that processing code acknowledges messages correctly.
Fields§
§event: EThe wrapped event.
acked: Arc<Mutex<bool>>Whether ack has been called.
context: ContextThe OTel context associated with this event.
Implementations§
Source§impl<E> MockReceivedEvent<E>
impl<E> MockReceivedEvent<E>
Trait Implementations§
Source§impl<E: Clone> Clone for MockReceivedEvent<E>
impl<E: Clone> Clone for MockReceivedEvent<E>
Source§fn clone(&self) -> MockReceivedEvent<E>
fn clone(&self) -> MockReceivedEvent<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: Debug> Debug for MockReceivedEvent<E>
impl<E: Debug> Debug for MockReceivedEvent<E>
Source§impl<E: Event> Deref for MockReceivedEvent<E>
impl<E: Event> Deref for MockReceivedEvent<E>
Source§impl<E: Event> From<E> for MockReceivedEvent<E>
impl<E: Event> From<E> for MockReceivedEvent<E>
Source§impl<E: PartialEq> PartialEq for MockReceivedEvent<E>
impl<E: PartialEq> PartialEq for MockReceivedEvent<E>
Source§impl<E: Event> ReceivedEvent<E> for MockReceivedEvent<E>
impl<E: Event> ReceivedEvent<E> for MockReceivedEvent<E>
Auto Trait Implementations§
impl<E> !RefUnwindSafe for MockReceivedEvent<E>
impl<E> !UnwindSafe for MockReceivedEvent<E>
impl<E> Freeze for MockReceivedEvent<E>where
E: Freeze,
impl<E> Send for MockReceivedEvent<E>where
E: Send,
impl<E> Sync for MockReceivedEvent<E>where
E: Sync,
impl<E> Unpin for MockReceivedEvent<E>where
E: Unpin,
impl<E> UnsafeUnpin for MockReceivedEvent<E>where
E: UnsafeUnpin,
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