pub enum AuthenticationStyle {
UserCredentials(String, String),
Token(String),
Basic {
username: String,
password: String,
},
Anonymous,
}
Expand description
Indicates the type of client authentication used by the NATS client
Variants§
UserCredentials(String, String)
JSON Web Token (JWT)-based authentication using a JWT and a seed (private) key
Token(String)
Single token based authentication
Basic
Basic authentication with username and password
Anonymous
Anonymous (unauthenticated)
Implementations§
Source§impl AuthenticationStyle
impl AuthenticationStyle
pub fn from_credsfile(file: &str) -> Result<AuthenticationStyle>
Trait Implementations§
Source§impl Clone for AuthenticationStyle
impl Clone for AuthenticationStyle
Source§fn clone(&self) -> AuthenticationStyle
fn clone(&self) -> AuthenticationStyle
Returns a copy 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 AuthenticationStyle
impl Debug for AuthenticationStyle
Source§impl PartialEq for AuthenticationStyle
impl PartialEq for AuthenticationStyle
impl StructuralPartialEq for AuthenticationStyle
Auto Trait Implementations§
impl Freeze for AuthenticationStyle
impl RefUnwindSafe for AuthenticationStyle
impl Send for AuthenticationStyle
impl Sync for AuthenticationStyle
impl Unpin for AuthenticationStyle
impl UnwindSafe for AuthenticationStyle
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