TextSignable

Trait TextSignable 

Source
pub trait TextSignable: Debug + Clone {
    // Required methods
    fn as_signable_text(&self) -> String;
    fn issuer_pubkey(&self) -> PubKeyEnum;
    fn signature(&self) -> Option<Sig>;
    fn set_signature(&mut self, _signature: Sig);

    // Provided methods
    fn sign(&mut self, signator: &SignatorEnum) -> Result<String, SignError> { ... }
    fn verify(&self) -> Result<(), SigError> { ... }
}
Expand description

Signatureable in text format

Required Methods§

Source

fn as_signable_text(&self) -> String

Return signable text

Source

fn issuer_pubkey(&self) -> PubKeyEnum

Return entity issuer pubkey

Source

fn signature(&self) -> Option<Sig>

Return entity signature

Source

fn set_signature(&mut self, _signature: Sig)

Change signature

Provided Methods§

Source

fn sign(&mut self, signator: &SignatorEnum) -> Result<String, SignError>

Sign entity

Source

fn verify(&self) -> Result<(), SigError>

Check signature of entity

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§