pub enum Protocol {
PossiblyPlain,
TLS,
}Expand description
The protocol of the NATS server
Variants§
PossiblyPlain
Plaintext with the option to later upgrade to TLS
This option should only be used when esplicity wanting to connect using a plaintext connection. Using this option over the public internet or other untrusted networks leaves the client open to MITM attacks.
Corresponds to the nats scheme.
TLS
TLS connection
Requires the TCP connection to successfully upgrade to TLS.
Corresponds to the tls scheme.
Trait Implementations§
impl Copy for Protocol
impl Eq for Protocol
Source§impl Ord for Protocol
impl Ord for Protocol
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Protocol
impl PartialOrd for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnsafeUnpin for Protocol
impl UnwindSafe for Protocol
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