pub struct TokenFamily {
pub tenant: TenantId,
pub principal: PrincipalId,
pub provider: Option<ProviderId>,
}Expand description
Identifies a cohesive token family for a tenant/principal/provider tuple.
Fields§
§tenant: TenantIdTenant identifier tied to all tokens in the family.
principal: PrincipalIdPrincipal identifier associated with the family.
provider: Option<ProviderId>Optional provider identifier that minted the tokens.
Implementations§
Source§impl TokenFamily
impl TokenFamily
Sourcepub fn new(tenant: TenantId, principal: PrincipalId) -> Self
pub fn new(tenant: TenantId, principal: PrincipalId) -> Self
Creates a family for the provided tenant and principal.
Trait Implementations§
Source§impl Clone for TokenFamily
impl Clone for TokenFamily
Source§fn clone(&self) -> TokenFamily
fn clone(&self) -> TokenFamily
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 TokenFamily
impl Debug for TokenFamily
Source§impl<'de> Deserialize<'de> for TokenFamily
impl<'de> Deserialize<'de> for TokenFamily
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
Source§impl Hash for TokenFamily
impl Hash for TokenFamily
Source§impl PartialEq for TokenFamily
impl PartialEq for TokenFamily
Source§impl Serialize for TokenFamily
impl Serialize for TokenFamily
impl Eq for TokenFamily
impl StructuralPartialEq for TokenFamily
Auto Trait Implementations§
impl Freeze for TokenFamily
impl RefUnwindSafe for TokenFamily
impl Send for TokenFamily
impl Sync for TokenFamily
impl Unpin for TokenFamily
impl UnwindSafe for TokenFamily
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.