pub struct MessageBuilder { /* private fields */ }
Implementations§
Source§impl MessageBuilder
impl MessageBuilder
pub fn new() -> Self
pub fn qos(self, qos: QoS) -> Self
pub fn payload<B: Into<Bytes>>(self, payload: B) -> Self
pub fn topic<S: Into<String>>(self, topic: S) -> Self
pub fn retained(self, retain: bool) -> Self
pub fn message_expiry_interval(self, expiry_interval: Option<Duration>) -> Self
pub fn response_topic<S: Into<String>>(self, response_topic: Option<S>) -> Self
Sourcepub fn utf8(self, is_utf8: bool) -> Self
pub fn utf8(self, is_utf8: bool) -> Self
Set Payload Format Indicator to 1 (UTF-8 Encoded Character Data) or None (unspecified bytes)
pub fn add_user_property<K: Into<String>, V: Into<String>>( self, key: K, value: V, ) -> Self
pub fn correlation_data<B: Into<Bytes>>( self, correlation_data: Option<B>, ) -> Self
pub fn finalize(self) -> Message
Trait Implementations§
Source§impl Debug for MessageBuilder
impl Debug for MessageBuilder
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