[−][src]Struct paho_mqtt::message::MessageBuilder
Builder to create a new Message
Methods
impl MessageBuilder
[src]
pub fn new() -> MessageBuilder
[src]
Create a new message builder.
pub fn topic<T>(self, topic: T) -> MessageBuilder where
T: Into<String>,
[src]
T: Into<String>,
pub fn payload<V>(self, payload: V) -> MessageBuilder where
V: Into<Vec<u8>>,
[src]
V: Into<Vec<u8>>,
pub fn qos(self, qos: i32) -> MessageBuilder
[src]
pub fn retained(self, retained: bool) -> MessageBuilder
[src]
Sets whether or not the published message should be retained by the broker.
Arguments
retained
Set true if the message should be retained by the broker,
false if not.
pub fn properties(self, props: Properties) -> MessageBuilder
[src]
Sets the collection of properties for the message.
Arguments
props
The collection of properties to include with the message.
pub fn finalize(self) -> Message
[src]
Finalize the builder to create the message.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MessageBuilder
impl Send for MessageBuilder
impl !Sync for MessageBuilder
impl Unpin for MessageBuilder
impl UnwindSafe for MessageBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,