pub enum AuthenticationMethod {
UserAndPassword {
username: String,
password: String,
},
Creds {
jwt: String,
nkey: KeyPair,
},
}Variants§
Implementations§
Source§impl AuthenticationMethod
impl AuthenticationMethod
Sourcepub fn from_creds(contents: &str) -> Result<Self, CredsParseError>
pub fn from_creds(contents: &str) -> Result<Self, CredsParseError>
Creates an AuthenticationMethod from the content of a credentials file.
§Errors
It returns an error if the content is not valid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthenticationMethod
impl RefUnwindSafe for AuthenticationMethod
impl Send for AuthenticationMethod
impl Sync for AuthenticationMethod
impl Unpin for AuthenticationMethod
impl UnwindSafe for AuthenticationMethod
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