pub struct ConnectionInformation {
pub verbose: bool,
pub pedantic: bool,
pub tls_required: bool,
pub auth_token: Option<String>,
pub user: Option<String>,
pub pass: Option<String>,
pub lang: String,
pub name: String,
pub version: String,
pub protocol: Option<u64>,
pub sig: Option<String>,
pub jwt: Option<String>,
}
Expand description
Represents server connection information sent by the client to configure the connection immediately after connecting. The NATS protocol definition for this is as follows:
CONNECT [json]
Fields§
§verbose: bool
§pedantic: bool
§tls_required: bool
§auth_token: Option<String>
§user: Option<String>
§pass: Option<String>
§lang: String
§name: String
§version: String
§protocol: Option<u64>
§sig: Option<String>
§jwt: Option<String>
Implementations§
Source§impl ConnectionInformation
impl ConnectionInformation
Sourcepub fn new(
verbose: bool,
pedantic: bool,
tls_required: bool,
auth_token: Option<String>,
user: Option<String>,
pass: Option<String>,
lang: String,
name: String,
version: String,
protocol: Option<u64>,
sig: Option<String>,
jwt: Option<String>,
) -> ConnectionInformation
pub fn new( verbose: bool, pedantic: bool, tls_required: bool, auth_token: Option<String>, user: Option<String>, pass: Option<String>, lang: String, name: String, version: String, protocol: Option<u64>, sig: Option<String>, jwt: Option<String>, ) -> ConnectionInformation
Constructor to create a new connection information struct
Trait Implementations§
Source§impl Clone for ConnectionInformation
impl Clone for ConnectionInformation
Source§fn clone(&self) -> ConnectionInformation
fn clone(&self) -> ConnectionInformation
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 ConnectionInformation
impl Debug for ConnectionInformation
Source§impl<'de> Deserialize<'de> for ConnectionInformation
impl<'de> Deserialize<'de> for ConnectionInformation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ConnectionInformation
impl Display for ConnectionInformation
Source§impl FromStr for ConnectionInformation
impl FromStr for ConnectionInformation
Source§impl PartialEq for ConnectionInformation
impl PartialEq for ConnectionInformation
Source§impl Serialize for ConnectionInformation
impl Serialize for ConnectionInformation
impl StructuralPartialEq for ConnectionInformation
Auto Trait Implementations§
impl Freeze for ConnectionInformation
impl RefUnwindSafe for ConnectionInformation
impl Send for ConnectionInformation
impl Sync for ConnectionInformation
impl Unpin for ConnectionInformation
impl UnwindSafe for ConnectionInformation
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