[−][src]Struct rants::Connect
The CONNECT
message sent by the client
Methods
impl Connect
[src]
pub fn new() -> Self
[src]
Construct a new default Connect
pub fn is_verbose(&self) -> bool
[src]
Return true
if the connection is verbose.
pub fn verbose(&mut self, verbose: bool) -> &mut Self
[src]
Turns on +OK protocol acknowledgements. [default = false
]
pub fn is_pedantic(&self) -> bool
[src]
Return true
if the connection is pedantic.
pub fn pedantic(&mut self, pedantic: bool) -> &mut Self
[src]
Turns on additional strict format checking, e.g. for properly formed subjects [default =
false
]
pub fn is_tls_required(&self) -> bool
[src]
Return true
if the connection requires TLS.
pub fn tls_required(&mut self, tls_required: bool) -> &mut Self
[src]
Indicates whether the client requires an SSL connection. [default = false
]
pub fn authorization(&self) -> Option<&Authorization>
[src]
Get the Authorization
pub fn token(&mut self, token: String) -> &mut Self
[src]
Set the authorization to use a token
pub fn username_password(
&mut self,
username: String,
password: String
) -> &mut Self
[src]
&mut self,
username: String,
password: String
) -> &mut Self
Set the authorization to use a username and password
pub fn set_authorization(
&mut self,
authorization: Option<Authorization>
) -> &mut Self
[src]
&mut self,
authorization: Option<Authorization>
) -> &mut Self
Set the authorization
pub fn clear_authorization(&mut self) -> &mut Self
[src]
Remove the authorization
pub fn get_name(&self) -> Option<&str>
[src]
Get the optional name of the client.
pub fn name(&mut self, name: String) -> &mut Self
[src]
Set the optional client name. [default = None
]
pub fn clear_name(&mut self) -> &mut Self
[src]
Remove the optional client name [default = None
]
pub fn get_lang(&self) -> &str
[src]
The implementation language of the client. [always = "rust"
]
pub fn get_version(&self) -> &str
[src]
The version of the client. [always = "<the crate version>"
]
pub fn get_protocol(&self) -> i32
[src]
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
]
pub fn is_echo(&self) -> bool
[src]
Return true
if echo is enabled on the connection.
pub fn echo(&mut self, echo: bool) -> &mut Self
[src]
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
]
Trait Implementations
impl Default for Connect
[src]
impl Clone for Connect
[src]
impl PartialEq<Connect> for Connect
[src]
impl Debug for Connect
[src]
impl Serialize for Connect
[src]
Auto Trait Implementations
impl Send for Connect
impl Unpin for Connect
impl Sync for Connect
impl RefUnwindSafe for Connect
impl UnwindSafe for Connect
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,