pub struct CredentialManager { /* private fields */ }Implementations§
Source§impl CredentialManager
impl CredentialManager
pub fn new(default_ttl: u64) -> Self
pub fn issue( &self, agent_did: &str, capabilities: Vec<String>, resources: Vec<String>, issued_for: Option<String>, ) -> Credential
pub fn validate(&self, credential_id: &str, token: &str) -> bool
pub fn revoke(&self, credential_id: &str, reason: &str) -> bool
pub fn rotate(&self, credential_id: &str) -> Option<Credential>
pub fn active_for_agent(&self, agent_did: &str) -> Vec<Credential>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CredentialManager
impl RefUnwindSafe for CredentialManager
impl Send for CredentialManager
impl Sync for CredentialManager
impl Unpin for CredentialManager
impl UnsafeUnpin for CredentialManager
impl UnwindSafe for CredentialManager
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> 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>
Converts
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>
Converts
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