Enum mqtt_async_client::client::KeepAlive [−][src]
pub enum KeepAlive {
Disabled,
Enabled {
secs: u16,
},
}Expand description
Represents the keep alive setting for a client.
Variants
Keep alive ping packets are disabled.
Send a keep alive ping packet every secs seconds.
Fields of Enabled
secs: u16The number of seconds between packets.
Implementations
Set keep alive time in seconds.
Panics if secs parameter is 0.
Returns whether keep alives are enabled.
Returns whether keep alives are disabled.
Returns the keep alive interval if enabled as Some(tokio::Duration), or None if disabled.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeepAlive
impl UnwindSafe for KeepAlive
Blanket Implementations
Mutably borrows from an owned value. Read more