pub struct SendMessage { /* private fields */ }Expand description
Builder for Messages::send; .await it to publish the message and
receive the created Message.
Implementations§
Source§impl SendMessage
impl SendMessage
Sourcepub fn metadata(self, metadata: Metadata) -> Self
pub fn metadata(self, metadata: Metadata) -> Self
Attaches opaque user-defined metadata to the message.
Sourcepub fn headers(self, headers: BTreeMap<String, String>) -> Self
pub fn headers(self, headers: BTreeMap<String, String>) -> Self
Attaches user-defined string headers to the message.
Sourcepub fn idempotency_key(self, key: impl Into<String>) -> Self
pub fn idempotency_key(self, key: impl Into<String>) -> Self
Supplies an idempotency key, making the send safe to retry (ADR-0006).
Trait Implementations§
Source§impl Clone for SendMessage
impl Clone for SendMessage
Source§fn clone(&self) -> SendMessage
fn clone(&self) -> SendMessage
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 SendMessage
impl Debug for SendMessage
Source§impl IntoFuture for SendMessage
impl IntoFuture for SendMessage
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SendMessage as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SendMessage as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SendMessage
impl !UnwindSafe for SendMessage
impl Freeze for SendMessage
impl Send for SendMessage
impl Sync for SendMessage
impl Unpin for SendMessage
impl UnsafeUnpin for SendMessage
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