pub struct ConnectOptions {
pub client_id: String,
pub keep_alive: Duration,
pub clean_start: bool,
pub username: Option<String>,
pub password: Option<Vec<u8>>,
pub will: Option<WillMessage>,
pub properties: ConnectProperties,
pub protocol_version: ProtocolVersion,
}Fields§
§client_id: String§keep_alive: Duration§clean_start: bool§username: Option<String>§password: Option<Vec<u8>>§will: Option<WillMessage>§properties: ConnectProperties§protocol_version: ProtocolVersionImplementations§
Source§impl ConnectOptions
impl ConnectOptions
pub fn new(client_id: impl Into<String>) -> Self
pub fn with_protocol_version(self, version: ProtocolVersion) -> Self
pub fn with_keep_alive(self, duration: Duration) -> Self
pub fn with_clean_start(self, clean: bool) -> Self
pub fn with_credentials( self, username: impl Into<String>, password: impl Into<Vec<u8>>, ) -> Self
pub fn with_will(self, will: WillMessage) -> Self
pub fn with_session_expiry_interval(self, interval: u32) -> Self
pub fn with_receive_maximum(self, receive_maximum: u16) -> Self
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
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 ConnectOptions
impl Debug for ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnwindSafe for ConnectOptions
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