pub struct TrustStore { /* private fields */ }Expand description
A trust store for managing known agent identities.
Implementations§
Source§impl TrustStore
impl TrustStore
pub fn new() -> Self
pub fn register(&mut self, identity: AgentIdentity)
pub fn revoke(&mut self, agent_id: &str)
pub fn is_trusted(&self, agent_id: &str) -> bool
pub fn get(&self, agent_id: &str) -> Option<&AgentIdentity>
pub fn verify(&self, agent_id: &str, now: u64) -> VerificationResult
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for TrustStore
impl Clone for TrustStore
Source§fn clone(&self) -> TrustStore
fn clone(&self) -> TrustStore
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 TrustStore
impl Debug for TrustStore
Auto Trait Implementations§
impl Freeze for TrustStore
impl RefUnwindSafe for TrustStore
impl Send for TrustStore
impl Sync for TrustStore
impl Unpin for TrustStore
impl UnsafeUnpin for TrustStore
impl UnwindSafe for TrustStore
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