pub fn revoke(&mut self, revoke: Revoke) -> Result<(), String> {
        Revoke::verify(&revoke)?;

        let pk: PublicKeyHashable = revoke.pk.clone().into();

        match self.nodes.entry(pk) {
            Occupied(mut entry) => {
                entry.get_mut().update_revoke(revoke);
                Ok(())
            }
            Entry::Vacant(_) => Err("There is no trust with such PublicKey".to_string()),
        }
    }
/// Mark public key as revoked.
Mark public key as revoked.
Mark public key as revoked .
pub fn revoke(&mut self, revoke: Revoke) -> Result<(), String> {
        Revoke::verify(&revoke)?;
        let pk: PublicKeyHashable = revoke.pk.clone().into();
        match self.nodes.entry(pk) {
            Occupied(mut entry) => {
                entry.get_mut().update_revoke(revoke);
                Ok(())
            }
            Entry::Vacant(_) => Err("There is no trust with such PublicKey".to_string()),
        }
    }
pub fn revoke ( & mut self , revoke : Revoke ) -> Result < ( ) , String > { Revoke :: verify ( & revoke ) ? ; let pk : PublicKeyHashable = revoke . pk . clone ( ) . into ( ) ; match self . nodes . entry ( pk ) { Occupied ( mut entry ) => { entry . get_mut ( ) . update_revoke ( revoke ) ; Ok ( ( ) ) } Entry :: Vacant ( _ ) => Err ( " " . to_string ( ) ) , } }
Mark public key as revoked.
Mark public key as revoked .
&mut self
revoke
Revoke