pub struct CredentialRef<'a> {
pub id: &'a [u8],
pub rp_id: &'a str,
pub rp_name: Option<&'a str>,
pub user_id: &'a [u8],
pub user_name: Option<&'a str>,
pub user_display_name: Option<&'a str>,
pub sign_count: &'a u32,
pub alg: &'a i32,
pub private_key: &'a SecBytes,
pub created: &'a i64,
pub discoverable: &'a bool,
pub cred_protect: Option<&'a u8>,
}Expand description
Borrowed (zero-copy) representation of a FIDO2 credential
This type is used for FFI callbacks to avoid heap allocations. All fields are borrowed and have no ownership.
Fields§
§id: &'a [u8]Credential ID (max 64 bytes)
rp_id: &'a strRelying party ID (max 128 bytes)
rp_name: Option<&'a str>Relying party name (optional, max 64 bytes)
user_id: &'a [u8]User ID (max 64 bytes)
user_name: Option<&'a str>User name
user_display_name: Option<&'a str>User display name (optional)
sign_count: &'a u32Signature counter
alg: &'a i32Algorithm (-7 for ES256)
private_key: &'a SecBytesPrivate key bytes (32 bytes for ES256)
created: &'a i64Creation timestamp
discoverable: &'a boolIs resident key
cred_protect: Option<&'a u8>Credential protection level
Implementations§
Trait Implementations§
Source§impl<'a> Clone for CredentialRef<'a>
impl<'a> Clone for CredentialRef<'a>
Source§fn clone(&self) -> CredentialRef<'a>
fn clone(&self) -> CredentialRef<'a>
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<'a> Debug for CredentialRef<'a>
impl<'a> Debug for CredentialRef<'a>
impl<'a> Copy for CredentialRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for CredentialRef<'a>
impl<'a> RefUnwindSafe for CredentialRef<'a>
impl<'a> Send for CredentialRef<'a>
impl<'a> Sync for CredentialRef<'a>
impl<'a> Unpin for CredentialRef<'a>
impl<'a> UnwindSafe for CredentialRef<'a>
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