pub struct Options {
pub client_id: String,
pub username: Option<String>,
pub password: Option<Vec<u8>>,
pub version: MqttVersion,
pub keep_alive: Duration,
pub clean_session: bool,
pub will: Option<WillMessage>,
pub ping_interval: Option<Duration>,
pub ack_timeout: Duration,
}Expand description
Connection settings.
Fields§
§client_id: String§username: Option<String>§password: Option<Vec<u8>>§version: MqttVersionProtocol version (default 3.1.1).
keep_alive: DurationKeep-alive announced to the broker, in whole seconds (0 turns it off). Default 30 s.
clean_session: boolStart with a clean session (default true).
will: Option<WillMessage>§ping_interval: Option<Duration>How often to send PINGREQ when idle (default: half the keep-alive).
ack_timeout: DurationHow long to wait for CONNACK, PUBACK and SUBACK (default DEFAULT_ACK_TIMEOUT).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Options
impl Freeze for Options
impl Move for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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