[−][src]Struct trust_graph::Trust
One element in chain of trust in a certificate. TODO delete pk from Trust (it is already in a trust node)
Fields
issued_for: PublicKeyFor whom this certificate is issued
expires_at: DurationExpiration date of a trust.
signature: Vec<u8>Signature of a previous trust in a chain. Signature is self-signed if it is a root trust.
issued_at: DurationCreation time of a trust
Implementations
impl Trust[src]
pub fn new(
issued_for: PublicKey,
expires_at: Duration,
issued_at: Duration,
signature: Vec<u8>
) -> Self[src]
issued_for: PublicKey,
expires_at: Duration,
issued_at: Duration,
signature: Vec<u8>
) -> Self
pub fn create(
issued_by: &KeyPair,
issued_for: PublicKey,
expires_at: Duration,
issued_at: Duration
) -> Self[src]
issued_by: &KeyPair,
issued_for: PublicKey,
expires_at: Duration,
issued_at: Duration
) -> Self
pub fn verify(
trust: &Trust,
issued_by: &PublicKey,
cur_time: Duration
) -> Result<(), String>[src]
trust: &Trust,
issued_by: &PublicKey,
cur_time: Duration
) -> Result<(), String>
Verifies that authorization is cryptographically correct.
pub fn encode(&self) -> Vec<u8>[src]
Encode the trust into a byte array
pub fn decode(arr: &[u8]) -> Result<Self, String>[src]
Decode a trust from a byte array as produced by encode.
pub fn convert_from_strings(
issued_for: &str,
signature: &str,
expires_at: &str,
issued_at: &str
) -> Result<Self, String>[src]
issued_for: &str,
signature: &str,
expires_at: &str,
issued_at: &str
) -> Result<Self, String>
Trait Implementations
impl Clone for Trust[src]
impl Debug for Trust[src]
impl Eq for Trust[src]
impl PartialEq<Trust> for Trust[src]
impl StructuralEq for Trust[src]
impl StructuralPartialEq for Trust[src]
impl ToString for Trust[src]
Auto Trait Implementations
impl RefUnwindSafe for Trust[src]
impl Send for Trust[src]
impl Sync for Trust[src]
impl Unpin for Trust[src]
impl UnwindSafe for Trust[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,