Struct trust_graph::TrustNode[][src]

pub struct TrustNode {
    pub pk: PublicKey,
    pub verified_at: Duration,
    // some fields omitted
}

An element of trust graph that store relations (trust or revoke) that given by some owners of public keys.

Fields

pk: PublicKey

identity key of this element

verified_at: Duration

for maintain

Implementations

impl TrustNode[src]

pub fn new(pk: PublicKey, verified_at: Duration) -> Self[src]

pub fn get_auth(&self, pk: PublicKey) -> Option<Auth>[src]

pub fn get_revoke(&self, pk: PublicKey) -> Option<Revoke>[src]

pub fn authorizations(&self) -> impl Iterator<Item = &Auth> + '_[src]

pub fn revocations(&self) -> impl Iterator<Item = &Revoke> + '_[src]

pub fn update_auth(&mut self, auth: Auth)[src]

Adds authorization. If the trust node already has this authorization, add auth with later expiration date.

pub fn update_revoke(&mut self, revoke: Revoke)[src]

Trait Implementations

impl Clone for TrustNode[src]

impl Debug for TrustNode[src]

impl<'de> Deserialize<'de> for TrustNode[src]

impl Serialize for TrustNode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,