pub struct LapinPublisher { /* private fields */ }Expand description
The live fire-and-forget publisher, on the connection’s shared publish channel. Cheap to clone.
Paired from LapinPublish, so it always has a connection. It aliases
that connection, though, and may outlive it: after the broker shuts down every publish
reports AmqpError::Closed instead of silently succeeding against a dead connection.
Trait Implementations§
Source§impl Clone for LapinPublisher
impl Clone for LapinPublisher
Source§impl Debug for LapinPublisher
impl Debug for LapinPublisher
Source§impl Publisher for LapinPublisher
impl Publisher for LapinPublisher
Source§type Payload = Lend
type Payload = Lend
basic_publish takes the payload as &[u8] and copies it into the frame it sends, so
this publisher reads the bytes and keeps nothing.
Source§async fn publish(
&self,
msg: OutgoingMessage<'_>,
options: Option<&Self::Options>,
) -> Result<(), Self::Error>
async fn publish( &self, msg: OutgoingMessage<'_>, options: Option<&Self::Options>, ) -> Result<(), Self::Error>
Publishes msg without waiting for a broker confirm.
The AMQP basic properties are options resolved over the policy’s defaults; a call that
adjusted nothing publishes with the policy’s own settings.
§Errors
Returns AmqpError::Closed once the broker has shut down and
AmqpError::Publish when the channel rejects the frame.
§Cancel safety
Not cancel safe: dropping the future may leave the message published or not.
Source§type Options = LapinPublishOptions
type Options = LapinPublishOptions
QoS, a priority, an ordering key, whatever this
transport lets one message differ from the next in. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LapinPublisher
impl !UnwindSafe for LapinPublisher
impl Freeze for LapinPublisher
impl Send for LapinPublisher
impl Sync for LapinPublisher
impl Unpin for LapinPublisher
impl UnsafeUnpin for LapinPublisher
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<P> PublishExt for P
impl<P> PublishExt for P
Source§fn message<'a, T>(
&'a self,
value: &'a T,
) -> PublishBuilder<&'a Self, MessageBody<'a, T>, UnnamedCodec, HeadersUnset, <T as OutgoingDestination>::Form>where
T: OutgoingDestination,
fn message<'a, T>(
&'a self,
value: &'a T,
) -> PublishBuilder<&'a Self, MessageBody<'a, T>, UnnamedCodec, HeadersUnset, <T as OutgoingDestination>::Form>where
T: OutgoingDestination,
#[derive(Outgoing)] value, encoded with the crate’s
default codec (name another one with with_codec(..)). A
Serialized value’s bytes leave as they are instead - the wire is
the type’s own (MessageWire), and no codec runs on it. Read moreSource§fn begin(
&self,
) -> impl Future<Output = Result<TransactionScope<'_, Self, UnnamedCodec, AnyDeclared>, Self::Error>> + Sendwhere
Self: Sized + TransactionalPublisher,
fn begin(
&self,
) -> impl Future<Output = Result<TransactionScope<'_, Self, UnnamedCodec, AnyDeclared>, Self::Error>> + Sendwhere
Self: Sized + TransactionalPublisher,
TransactionScope that
owns it. Read moreSource§fn owned_transaction(
&self,
) -> impl Future<Output = Result<TypedTransaction<Self::Transaction, UnnamedCodec, AnyDeclared>, Self::Error>> + Sendwhere
Self: Sized + OwnedTransactions,
fn owned_transaction(
&self,
) -> impl Future<Output = Result<TypedTransaction<Self::Transaction, UnnamedCodec, AnyDeclared>, Self::Error>> + Sendwhere
Self: Sized + OwnedTransactions,
TypedTransaction that owns it. Read more