[−][src]Struct sage_mqtt::Will
Due to the unstable nature of a connexion, the client can loose its connection to the server. This ungraceful disconnect can be notified to every other clients by specifying a Last Will message that is given upon connection. When a client ungracefully disconnect from a server (when the keep alive is reached), the server will publish the Last Will message to anyone subscribed to its topic.
Fields
qos: QoS
The quality of service for the will message.
retain: bool
If the message is to be retained. A retain message is kept in memory by a broker (one per topic) to sent to future subscriptions.
delay_interval: u32
Delay in seconds the broket will wait after a deconnction before publishing the will message. The will message can also be published at session expires if it happens first.
payload_format_indicator: bool
If true, the will message will be a valid UTF-8 encoded string. If not the will message can be anything, even a unicorn.
message_expiry_interval: Option<u32>
Corresponds to the expiry interval of the Publish
message sent.
content_type: String
Describes the type of content of the payload. Is generally a MIME descriptor.
response_topic: Option<String>
Optional topic used as response if the Will message is a request.
correlation_data: Option<Vec<u8>>
Optional correlation optionaly used if the Will message is a request.
user_properties: Vec<(String, String)>
General purpose properties
topic: String
The Last Will Topic. Cannot be empty.
message: Vec<u8>
The last will payload.
Trait Implementations
impl Clone for Will
[src]
impl Debug for Will
[src]
impl Default for Will
[src]
impl PartialEq<Will> for Will
[src]
impl StructuralPartialEq for Will
[src]
Auto Trait Implementations
impl RefUnwindSafe for Will
impl Send for Will
impl Sync for Will
impl Unpin for Will
impl UnwindSafe for Will
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,