pub struct Connect { /* private fields */ }Expand description
The CONNECT message sent by the client
Implementations§
Source§impl Connect
impl Connect
Sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Return true if the connection is verbose.
Sourcepub fn verbose(&mut self, verbose: bool) -> &mut Self
pub fn verbose(&mut self, verbose: bool) -> &mut Self
Turns on +OK protocol acknowledgements. [default = false]
Sourcepub fn is_pedantic(&self) -> bool
pub fn is_pedantic(&self) -> bool
Return true if the connection is pedantic.
Sourcepub fn pedantic(&mut self, pedantic: bool) -> &mut Self
pub fn pedantic(&mut self, pedantic: bool) -> &mut Self
Turns on additional strict format checking, e.g. for properly formed subjects [default =
false]
Sourcepub fn is_tls_required(&self) -> bool
pub fn is_tls_required(&self) -> bool
Return true if the connection requires TLS.
Sourcepub fn tls_required(&mut self, tls_required: bool) -> &mut Self
pub fn tls_required(&mut self, tls_required: bool) -> &mut Self
Indicates whether the client requires an SSL connection. [default = false]
Get the Authorization
Sourcepub fn username_password(
&mut self,
username: String,
password: String,
) -> &mut Self
pub fn username_password( &mut self, username: String, password: String, ) -> &mut Self
Set the authorization to use a username and password
Set the authorization
Remove the authorization
Sourcepub fn name(&mut self, name: String) -> &mut Self
pub fn name(&mut self, name: String) -> &mut Self
Set the optional client name. [default = None]
Sourcepub fn clear_name(&mut self) -> &mut Self
pub fn clear_name(&mut self) -> &mut Self
Remove the optional client name [default = None]
Sourcepub fn get_version(&self) -> &str
pub fn get_version(&self) -> &str
The version of the client. [always = "<the crate version>"]
Sourcepub fn get_protocol(&self) -> i32
pub fn get_protocol(&self) -> i32
Optional int. Sending 0 (or absent) indicates client supports original protocol. Sending 1
indicates that the client supports dynamic reconfiguration of cluster topology changes by
asynchronously receiving INFO messages with known servers it can reconnect to. [always =
1]
Sourcepub fn echo(&mut self, echo: bool) -> &mut Self
pub fn echo(&mut self, echo: bool) -> &mut Self
Optional boolean. If set to true, the server (version 1.2.0+) will send originating
messages from this connection to its own subscriptions. Clients should set this to true
only for server supporting this feature, which is when proto in the INFO protocol is set to
at least 1 [default = false]