pub struct WillProperties {
pub delay_interval: Option<Duration>,
pub payload_format_indicator: Option<u8>,
pub message_expiry_interval: Option<Duration>,
pub content_type: Option<String>,
pub response_topic: Option<String>,
pub correlation_data: Option<Bytes>,
pub user_properties: Vec<(String, String)>,
}Expand description
Represents the properties of a Will message in MQTT v5.
These properties provide extended functionality for the last will and testament message, including delivery timing, content format, and correlation data.
§Example
use std::time::Duration;
use mqute_codec::protocol::v5::WillProperties;
let will_properties = WillProperties {
delay_interval: Some(Duration::from_secs(10)),
content_type: Some("json".to_string()),
..Default::default()
};Fields§
§delay_interval: Option<Duration>Delay before sending the Will message after connection loss
payload_format_indicator: Option<u8>Format of the Will message payload (0=bytes, 1=UTF-8)
message_expiry_interval: Option<Duration>Lifetime of the Will message in seconds
content_type: Option<String>Content type descriptor (MIME type)
response_topic: Option<String>Topic name for the response message
correlation_data: Option<Bytes>Correlation data for the response message
user_properties: Vec<(String, String)>User-defined key-value properties
Trait Implementations§
Source§impl Clone for WillProperties
impl Clone for WillProperties
Source§fn clone(&self) -> WillProperties
fn clone(&self) -> WillProperties
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WillProperties
impl Debug for WillProperties
Source§impl Default for WillProperties
impl Default for WillProperties
Source§fn default() -> WillProperties
fn default() -> WillProperties
Returns the “default value” for a type. Read more
Source§impl PartialEq for WillProperties
impl PartialEq for WillProperties
impl Eq for WillProperties
impl StructuralPartialEq for WillProperties
Auto Trait Implementations§
impl !Freeze for WillProperties
impl RefUnwindSafe for WillProperties
impl Send for WillProperties
impl Sync for WillProperties
impl Unpin for WillProperties
impl UnwindSafe for WillProperties
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