pub struct ScopedPublisher<'a> { /* private fields */ }Expand description
A named publisher resolved from a Context, sending through the scope’s
publish pipeline.
Returned by Context::publisher. Publishing through it runs the
same PublishMiddleware chain (envelope, metrics) as a macro reply, so a manual publish from a
handler is not a hole in the pipeline.
Implementations§
Source§impl<'a> ScopedPublisher<'a>
impl<'a> ScopedPublisher<'a>
Sourcepub async fn publish(
&self,
out: Outgoing<'_>,
) -> Result<(), Box<dyn StdError + Send + Sync>>
pub async fn publish( &self, out: Outgoing<'_>, ) -> Result<(), Box<dyn StdError + Send + Sync>>
Sends out through the publish pipeline to the broker, carrying the originating delivery’s
per-delivery extensions for any transactional middleware to read.
§Errors
Returns the boxed error from a middleware or the broker publish if either fails.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ScopedPublisher<'a>
impl<'a> !UnwindSafe for ScopedPublisher<'a>
impl<'a> Freeze for ScopedPublisher<'a>
impl<'a> Send for ScopedPublisher<'a>
impl<'a> Sync for ScopedPublisher<'a>
impl<'a> Unpin for ScopedPublisher<'a>
impl<'a> UnsafeUnpin for ScopedPublisher<'a>
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