pub struct InMemoryStreamingBackend { /* private fields */ }Expand description
In-memory streaming backend for unit tests (no Kafka required).
Implementations§
Trait Implementations§
Source§impl Default for InMemoryStreamingBackend
impl Default for InMemoryStreamingBackend
Source§impl StreamingBackend for InMemoryStreamingBackend
impl StreamingBackend for InMemoryStreamingBackend
Source§fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
payload: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
payload: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Publish raw bytes to a topic.
Source§fn poll<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StreamingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StreamingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pop the next message from a topic. Returns
None if empty.Auto Trait Implementations§
impl !Freeze for InMemoryStreamingBackend
impl RefUnwindSafe for InMemoryStreamingBackend
impl Send for InMemoryStreamingBackend
impl Sync for InMemoryStreamingBackend
impl Unpin for InMemoryStreamingBackend
impl UnsafeUnpin for InMemoryStreamingBackend
impl UnwindSafe for InMemoryStreamingBackend
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