pub struct KafkaTestPublisher { /* private fields */ }Expand description
Publisher into the in-process router.
Mirrors KafkaPublisher delivery semantics minus the cluster: the
message name is the topic, and the partition-key header rides along for keyed worker lanes.
Trait Implementations§
Source§impl Clone for KafkaTestPublisher
impl Clone for KafkaTestPublisher
Source§fn clone(&self) -> KafkaTestPublisher
fn clone(&self) -> KafkaTestPublisher
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 KafkaTestPublisher
impl Debug for KafkaTestPublisher
Source§impl Publisher for KafkaTestPublisher
impl Publisher for KafkaTestPublisher
Source§async fn publish(&self, msg: OutgoingMessage<'_>) -> Result<(), Self::Error>
async fn publish(&self, msg: OutgoingMessage<'_>) -> Result<(), Self::Error>
Routes msg to subscribers of the topic named by msg.name().
§Errors
Returns KafkaError::InvalidOptions when the topic name is empty.
Source§type Error = KafkaError
type Error = KafkaError
The error type returned by
publish.Auto Trait Implementations§
impl Freeze for KafkaTestPublisher
impl RefUnwindSafe for KafkaTestPublisher
impl Send for KafkaTestPublisher
impl Sync for KafkaTestPublisher
impl Unpin for KafkaTestPublisher
impl UnsafeUnpin for KafkaTestPublisher
impl UnwindSafe for KafkaTestPublisher
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