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: PublicKey
who is revoked
revoked_at: Duration
date when revocation was created
revoked_by: PublicKey
the issuer of this revocation
signature: Signature
proof of this revocation
Implementations§
source§impl 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> ⓘ
sourcepub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
pub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
Verifies that revocation is cryptographically correct.
Trait Implementations§
source§impl Clone for Revocation
impl Clone for Revocation
source§fn clone(&self) -> Revocation
fn clone(&self) -> Revocation
Returns a copy of the value. Read more
1.0.0 · 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 Revocation
impl Debug for Revocation
source§impl<'de> Deserialize<'de> for Revocation
impl<'de> Deserialize<'de> for Revocation
source§fn 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
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§
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