pub struct DummyProducer { /* private fields */ }Expand description
A Producer that records everything it is given, for assertions in tests.
Cloning shares the same buffer, so a clone can be handed to an
InventoryTracker while the original is used to read
back what was emitted.
Implementations§
Source§impl DummyProducer
impl DummyProducer
Trait Implementations§
Source§impl Clone for DummyProducer
impl Clone for DummyProducer
Source§fn clone(&self) -> DummyProducer
fn clone(&self) -> DummyProducer
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 Debug for DummyProducer
impl Debug for DummyProducer
Source§impl Default for DummyProducer
impl Default for DummyProducer
Source§fn default() -> DummyProducer
fn default() -> DummyProducer
Returns the “default value” for a type. Read more
Source§impl Producer for DummyProducer
impl Producer for DummyProducer
Source§type Error = Infallible
type Error = Infallible
What can go wrong when sending.
Source§fn send(&self, key: &[u8], payload: Vec<u8>) -> Result<(), Self::Error>
fn send(&self, key: &[u8], payload: Vec<u8>) -> Result<(), Self::Error>
Enqueues one record. Read more
Source§fn join_blocking(&self, _timeout: Duration) -> Result<(), Self::Error>
fn join_blocking(&self, _timeout: Duration) -> Result<(), Self::Error>
Blocks until enqueued records have been delivered, or
timeout elapses. Read moreSource§fn join(
&self,
timeout: Duration,
) -> impl Future<Output = Result<(), Self::Error>> + Send + use<Self>
fn join( &self, timeout: Duration, ) -> impl Future<Output = Result<(), Self::Error>> + Send + use<Self>
Waits for enqueued records to be delivered, or until
timeout elapses. Read moreErases this producer’s transport and error type, so one producer can serve
several trackers. Read more
Auto Trait Implementations§
impl Freeze for DummyProducer
impl RefUnwindSafe for DummyProducer
impl Send for DummyProducer
impl Sync for DummyProducer
impl Unpin for DummyProducer
impl UnsafeUnpin for DummyProducer
impl UnwindSafe for DummyProducer
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