Struct trust_graph::Revocation
source · [−]pub struct Revocation {
pub pk: PublicKey,
pub revoked_at: Duration,
pub revoked_by: PublicKey,
pub signature: Signature,
}Expand description
“A document” that cancels trust created before. TODO delete pk from Revoke (it is already in a trust node)
Fields
pk: PublicKeywho is revoked
revoked_at: Durationdate when revocation was created
revoked_by: PublicKeythe issuer of this revocation
signature: Signatureproof of this revocation
Implementations
sourceimpl Revocation
impl Revocation
pub fn new(
revoked_by: PublicKey,
pk: PublicKey,
revoked_at: Duration,
signature: Signature
) -> Self
sourcepub fn create(
revoker: &KeyPair,
to_revoke: PublicKey,
revoked_at: Duration
) -> Self
pub fn create(
revoker: &KeyPair,
to_revoke: PublicKey,
revoked_at: Duration
) -> Self
Creates new revocation signed by a revoker.
pub fn signature_bytes(pk: &PublicKey, revoked_at: Duration) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
sourcepub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
pub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
Verifies that revocation is cryptographically correct.
Trait Implementations
sourceimpl Clone for Revocation
impl Clone for Revocation
sourcefn clone(&self) -> Revocation
fn clone(&self) -> Revocation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for Revocation
impl Debug for Revocation
sourceimpl<'de> Deserialize<'de> for Revocation
impl<'de> Deserialize<'de> for Revocation
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Revocation
impl Serialize for Revocation
Auto Trait Implementations
impl RefUnwindSafe for Revocation
impl Send for Revocation
impl Sync for Revocation
impl Unpin for Revocation
impl UnwindSafe for Revocation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more