pub struct DirectReplyTo;Expand description
Redirects each reply of a #[subscriber(.., publish(..))] handler to the requester’s
private reply-to address, echoing its correlation id.
This is the canonical responder wiring for request/reply over RabbitMQ direct
reply-to: compose it onto the reply publisher at mount time and the
handler stays a pure request-to-reply function. Requests without a reply-to header fall
through to the mount’s static destination.
§Examples
use ruststream::runtime::TypedPublisher;
use ruststream_lapin::{DirectReplyTo, LapinBroker};
let broker = LapinBroker::new("amqp://localhost:5672");
let replies = TypedPublisher::new(broker.publisher()).transform(DirectReplyTo);Trait Implementations§
Source§impl Clone for DirectReplyTo
impl Clone for DirectReplyTo
Source§fn clone(&self) -> DirectReplyTo
fn clone(&self) -> DirectReplyTo
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 moreimpl Copy for DirectReplyTo
Source§impl Debug for DirectReplyTo
impl Debug for DirectReplyTo
Source§impl Default for DirectReplyTo
impl Default for DirectReplyTo
Source§fn default() -> DirectReplyTo
fn default() -> DirectReplyTo
Returns the “default value” for a type. Read more
impl Eq for DirectReplyTo
Source§impl PartialEq for DirectReplyTo
impl PartialEq for DirectReplyTo
Source§impl<C> PublishTransform<C> for DirectReplyTo
impl<C> PublishTransform<C> for DirectReplyTo
Source§fn apply(&self, out: &mut Outgoing<'_>, cx: &PublishContext<'_, C>)
fn apply(&self, out: &mut Outgoing<'_>, cx: &PublishContext<'_, C>)
Transforms
out in place before it is sent, reading the delivery through cx.impl StructuralPartialEq for DirectReplyTo
Auto Trait Implementations§
impl Freeze for DirectReplyTo
impl RefUnwindSafe for DirectReplyTo
impl Send for DirectReplyTo
impl Sync for DirectReplyTo
impl Unpin for DirectReplyTo
impl UnsafeUnpin for DirectReplyTo
impl UnwindSafe for DirectReplyTo
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