pub struct FullCredentials {
pub name: UserId,
pub passphrase: Passphrase,
}
Expand description
Credentials for a NetHsm
.
Tracks a UserId
and an accompanying Passphrase
.
Different from Credentials
, this type requires a Passphrase
.
Fields§
§name: UserId
The user name.
passphrase: Passphrase
The passphrase for name
.
Implementations§
Source§impl FullCredentials
impl FullCredentials
Sourcepub fn new(name: UserId, passphrase: Passphrase) -> Self
pub fn new(name: UserId, passphrase: Passphrase) -> Self
Creates a new FullCredentials
.
§Examples
use nethsm::FullCredentials;
let creds = FullCredentials::new("operator".parse()?, "passphrase".parse()?);
Trait Implementations§
Source§impl Clone for FullCredentials
impl Clone for FullCredentials
Source§fn clone(&self) -> FullCredentials
fn clone(&self) -> FullCredentials
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 FullCredentials
impl Debug for FullCredentials
Source§impl<'de> Deserialize<'de> for FullCredentials
impl<'de> Deserialize<'de> for FullCredentials
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 From<&FullCredentials> for BasicAuth
impl From<&FullCredentials> for BasicAuth
Source§fn from(value: &FullCredentials) -> Self
fn from(value: &FullCredentials) -> Self
Converts to this type from the input type.
Source§impl From<&FullCredentials> for Credentials
impl From<&FullCredentials> for Credentials
Source§fn from(value: &FullCredentials) -> Self
fn from(value: &FullCredentials) -> Self
Converts to this type from the input type.
Source§impl From<FullCredentials> for BasicAuth
impl From<FullCredentials> for BasicAuth
Source§fn from(value: FullCredentials) -> Self
fn from(value: FullCredentials) -> Self
Converts to this type from the input type.
Source§impl From<FullCredentials> for Credentials
impl From<FullCredentials> for Credentials
Source§fn from(value: FullCredentials) -> Self
fn from(value: FullCredentials) -> Self
Converts to this type from the input type.
Source§impl Serialize for FullCredentials
impl Serialize for FullCredentials
Source§impl TryFrom<&Credentials> for FullCredentials
impl TryFrom<&Credentials> for FullCredentials
Source§impl TryFrom<Credentials> for FullCredentials
impl TryFrom<Credentials> for FullCredentials
Auto Trait Implementations§
impl Freeze for FullCredentials
impl RefUnwindSafe for FullCredentials
impl Send for FullCredentials
impl Sync for FullCredentials
impl Unpin for FullCredentials
impl UnwindSafe for FullCredentials
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