pub struct TokenClassification {
pub token_type: TokenType,
pub structure: TokenStructure,
pub blocks: Vec<BlockMetadata>,
pub subject: Option<String>,
pub resource: Option<String>,
pub operation: Option<String>,
}Expand description
Complete classification of a token
Fields§
§token_type: TokenTypeThe type of token
structure: TokenStructureThe structural pattern
blocks: Vec<BlockMetadata>Metadata for each block
subject: Option<String>Subject/identity from the authority block
resource: Option<String>Resource (for authorization tokens)
operation: Option<String>Operation (for authorization tokens)
Implementations§
Source§impl TokenClassification
impl TokenClassification
Sourcepub fn revocation_ids(&self) -> Vec<&RevocationId>
pub fn revocation_ids(&self) -> Vec<&RevocationId>
Get all revocation IDs from this token
Get the authority block’s revocation ID
Sourcepub fn active_revocation_id(&self) -> Option<&RevocationId>
pub fn active_revocation_id(&self) -> Option<&RevocationId>
Get the active/current revocation ID (last block)
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
Get the number of blocks
Trait Implementations§
Source§impl Clone for TokenClassification
impl Clone for TokenClassification
Source§fn clone(&self) -> TokenClassification
fn clone(&self) -> TokenClassification
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 TokenClassification
impl Debug for TokenClassification
Auto Trait Implementations§
impl Freeze for TokenClassification
impl RefUnwindSafe for TokenClassification
impl Send for TokenClassification
impl Sync for TokenClassification
impl Unpin for TokenClassification
impl UnwindSafe for TokenClassification
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