pub struct UpdateMessage { /* private fields */ }Expand description
Builder for Messages::update; .await it to apply the edit and receive
the updated Message.
Update semantics are full-replace: see Messages::update.
Implementations§
Source§impl UpdateMessage
impl UpdateMessage
Sourcepub fn metadata(self, metadata: Metadata) -> Self
pub fn metadata(self, metadata: Metadata) -> Self
Sets the message’s new metadata. Omitting this resets metadata to empty
(full-replace; see Messages::update).
Sourcepub fn headers(self, headers: BTreeMap<String, String>) -> Self
pub fn headers(self, headers: BTreeMap<String, String>) -> Self
Sets the message’s new headers. Omitting this resets headers to empty
(full-replace; see Messages::update).
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Attaches an optional description of the update operation.
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 update safe to retry (ADR-0006).
Trait Implementations§
Source§impl Clone for UpdateMessage
impl Clone for UpdateMessage
Source§fn clone(&self) -> UpdateMessage
fn clone(&self) -> UpdateMessage
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 UpdateMessage
impl Debug for UpdateMessage
Source§impl IntoFuture for UpdateMessage
impl IntoFuture for UpdateMessage
Source§type IntoFuture = Pin<Box<dyn Future<Output = <UpdateMessage as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <UpdateMessage 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 UpdateMessage
impl !UnwindSafe for UpdateMessage
impl Freeze for UpdateMessage
impl Send for UpdateMessage
impl Sync for UpdateMessage
impl Unpin for UpdateMessage
impl UnsafeUnpin for UpdateMessage
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