pub struct LapinTestBroker { /* private fields */ }Expand description
In-process broker for application tests: same descriptors, no RabbitMQ server.
Mirrors the real ladder: new is synchronous, and the consuming connect hands out the
ConnectedLapinTestBroker that carries the subscribe and publish surface.
§Examples
use ruststream::{Broker, OutgoingMessage, Publisher, Subscriber};
use ruststream_lapin::testing::{LapinTestBroker, LapinTestPublish};
let broker = LapinTestBroker::new().connect().await?;
let mut subscriber = broker.subscribe("orders").await?;
broker
.publisher(LapinTestPublish)
.publish(OutgoingMessage::new("orders", b"{}"))
.await?;Implementations§
Trait Implementations§
Source§impl Broker for LapinTestBroker
impl Broker for LapinTestBroker
Source§impl Clone for LapinTestBroker
impl Clone for LapinTestBroker
Source§fn clone(&self) -> LapinTestBroker
fn clone(&self) -> LapinTestBroker
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 LapinTestBroker
impl Debug for LapinTestBroker
Source§impl Default for LapinTestBroker
impl Default for LapinTestBroker
Source§fn default() -> LapinTestBroker
fn default() -> LapinTestBroker
Returns the “default value” for a type. Read more
Source§impl DescribeServer for LapinTestBroker
impl DescribeServer for LapinTestBroker
Source§fn describe_server(&self) -> ServerSpec
fn describe_server(&self) -> ServerSpec
Returns the server coordinates for this broker.
Auto Trait Implementations§
impl Freeze for LapinTestBroker
impl RefUnwindSafe for LapinTestBroker
impl Send for LapinTestBroker
impl Sync for LapinTestBroker
impl Unpin for LapinTestBroker
impl UnsafeUnpin for LapinTestBroker
impl UnwindSafe for LapinTestBroker
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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