pub enum Credential {
PublicKey {
public_key_multibase: String,
},
OidcIdentity(OidcIdentity),
}Expand description
One way a process logs in to the hosting server as an account.
Variants§
PublicKey
A key the account signs with; whoever holds the private half is the account.
OidcIdentity(OidcIdentity)
An OpenID Connect identity whose tokens log in as the account.
Implementations§
Source§impl Credential
impl Credential
Sourcepub fn public_key_multibase(&self) -> Option<&str>
pub fn public_key_multibase(&self) -> Option<&str>
The key’s multibase text, for a key credential.
Sourcepub fn oidc_identity(&self) -> Option<&OidcIdentity>
pub fn oidc_identity(&self) -> Option<&OidcIdentity>
The identity, for an OpenID Connect credential.
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
How a screen names this credential: a key by its fingerprint, an identity by its issuer.
Sourcepub fn from_record(value: &Value) -> Option<Self>
pub fn from_record(value: &Value) -> Option<Self>
Parses a whole bot.did.credential record body into the credential
it carries. None when the record is not one, or carries a
credential kind this reader does not know.
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 PartialEq for Credential
impl PartialEq for Credential
Source§fn eq(&self, other: &Credential) -> bool
fn eq(&self, other: &Credential) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.