pub struct CredentialRef { /* private fields */ }Expand description
A reference to a credential which has been stored in a session.
Credentials can be quite large; we’d really like to avoid passing them back and forth across the FFI boundary more than is strictly required. Therefore, we use this type which is substantially more compact.
Created with TransactionContext::add_credential.
This reference is not a literal reference in memory. It is instead a key with which a credential can be retrieved. This means that it is stable over time and across the FFI boundary.
Implementations§
Source§impl CredentialRef
impl CredentialRef
Source§impl CredentialRef
impl CredentialRef
Sourcepub fn client_id(&self) -> &ClientIdRef
pub fn client_id(&self) -> &ClientIdRef
Get the client ID associated with this credential
Sourcepub fn public_key(&self) -> &[u8] ⓘ
pub fn public_key(&self) -> &[u8] ⓘ
Get the public key associated with this credential
Sourcepub fn type(&self) -> CredentialType
pub fn type(&self) -> CredentialType
Get the credential type associated with this credential
Sourcepub fn signature_scheme(&self) -> SignatureScheme
pub fn signature_scheme(&self) -> SignatureScheme
Get the signature scheme associated with this credential
Sourcepub fn earliest_validity(&self) -> u64
pub fn earliest_validity(&self) -> u64
Get the unix timestamp of the earliest validity of this credential.
Trait Implementations§
Source§impl Clone for CredentialRef
impl Clone for CredentialRef
Source§fn clone(&self) -> CredentialRef
fn clone(&self) -> CredentialRef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CredentialRef
impl Debug for CredentialRef
Source§impl<'de> Deserialize<'de> for CredentialRef
impl<'de> Deserialize<'de> for CredentialRef
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>,
Source§impl From<(ClientId, Vec<u8>, CredentialType, SignatureScheme, u64)> for CredentialRef
impl From<(ClientId, Vec<u8>, CredentialType, SignatureScheme, u64)> for CredentialRef
Source§impl From<CredentialRef> for (ClientId, Vec<u8>, CredentialType, SignatureScheme, u64)
impl From<CredentialRef> for (ClientId, Vec<u8>, CredentialType, SignatureScheme, u64)
Source§fn from(value: CredentialRef) -> Self
fn from(value: CredentialRef) -> Self
Source§impl Serialize for CredentialRef
impl Serialize for CredentialRef
Auto Trait Implementations§
impl Freeze for CredentialRef
impl RefUnwindSafe for CredentialRef
impl Send for CredentialRef
impl Sync for CredentialRef
impl Unpin for CredentialRef
impl UnwindSafe for CredentialRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more