pub struct MessageBuilder { /* private fields */ }
Expand description
Builder for constructing Message instances
Implementations§
Source§impl MessageBuilder
impl MessageBuilder
Sourcepub fn set_message_id(self, message_id: String) -> Self
pub fn set_message_id(self, message_id: String) -> Self
Set the identifier for this message
Sourcepub fn set_content_type(self, content_type: String) -> Self
pub fn set_content_type(self, content_type: String) -> Self
Set the content-type for this message, such as text/plain
.
To allow routing query on the message body, this value should be set to application/json
Sourcepub fn set_content_encoding(self, content_encoding: String) -> Self
pub fn set_content_encoding(self, content_encoding: String) -> Self
Set the content-encoding for this message.
If the content-type is set to application/json
, allowed values are UTF-8
, UTF-16
, UTF-32
.
Sourcepub fn add_message_property(self, key: String, value: String) -> Self
pub fn add_message_property(self, key: String, value: String) -> Self
Add a message property
Trait Implementations§
Source§impl Debug for MessageBuilder
impl Debug for MessageBuilder
Source§impl Default for MessageBuilder
impl Default for MessageBuilder
Source§fn default() -> MessageBuilder
fn default() -> MessageBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MessageBuilder
impl RefUnwindSafe for MessageBuilder
impl Send for MessageBuilder
impl Sync for MessageBuilder
impl Unpin for MessageBuilder
impl UnwindSafe for MessageBuilder
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