pub struct GeneratedApiKey {
pub key: String,
pub key_id: String,
pub hash: String,
}Expand description
API Key generation result.
The plain-text key should be shown once to the operator and stored securely. The hash should be persisted in configuration or external secret storage.
Fields§
§key: StringPlain-text API key for one-time display
key_id: StringStable key identifier derived from the key
hash: StringArgon2 PHC hash to store and verify against
Trait Implementations§
Source§impl Clone for GeneratedApiKey
impl Clone for GeneratedApiKey
Source§fn clone(&self) -> GeneratedApiKey
fn clone(&self) -> GeneratedApiKey
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 GeneratedApiKey
impl Debug for GeneratedApiKey
Source§impl<'de> Deserialize<'de> for GeneratedApiKey
impl<'de> Deserialize<'de> for GeneratedApiKey
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
Auto Trait Implementations§
impl Freeze for GeneratedApiKey
impl RefUnwindSafe for GeneratedApiKey
impl Send for GeneratedApiKey
impl Sync for GeneratedApiKey
impl Unpin for GeneratedApiKey
impl UnsafeUnpin for GeneratedApiKey
impl UnwindSafe for GeneratedApiKey
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