Struct poster::PublishOpts

source ·
pub struct PublishOpts<'a> { /* private fields */ }
Expand description

Publish options, represented as a consuming builder. Used during publish request, translated to the PUBLISH packet.

Implementations§

Creates a new PublishOpts instance.

Sets a retain flag.

Sets QoS level.

Sets topic.

Sets payload format indicator. Value false indicates that the will payload is in unspecified format. Value true indicates that the payload is UTF8 encoded character data.

Sets the topic alias.

Arguments

val - value greater than 0

Panics

When val equals 0.

Sets the expiry interval of the message.

Arguments

val - Duration value less than u32::MAX in seconds.

Panics

When the duration in seconds is greater than u32::MAX.

Sets correlation data.

Sets response topic.

Sets message content type.

Sets user properties as key-value pairs. Multiple user properties may be set.

Sets message data.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.