#[non_exhaustive]pub struct Credential {
pub user_id: UserId,
pub device_id: DeviceId,
pub binding: DeviceBinding,
pub material: Vec<u8>,
}Expand description
One stored proof-of-identity bound to a (UserId, DeviceId) pair.
The shape that CredentialStore reads and writes. The binding field
records how the credential was established; provider-specific secrets
live in material as an opaque byte blob (e.g. a passkey credential ID,
an Argon2id hash, a refresh-token chain root, …) whose interpretation is
owned by the provider that produced it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_id: UserId§device_id: DeviceId§binding: DeviceBinding§material: Vec<u8>Implementations§
Source§impl Credential
impl Credential
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Credential
impl Debug for Credential
Source§impl<'de> Deserialize<'de> for Credential
impl<'de> Deserialize<'de> for Credential
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
impl Eq for Credential
Source§impl PartialEq for Credential
impl PartialEq for Credential
Source§impl Serialize for Credential
impl Serialize for Credential
impl StructuralPartialEq for Credential
Auto Trait Implementations§
impl Freeze for Credential
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnsafeUnpin for Credential
impl UnwindSafe for Credential
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