pub trait SelfSigned<T>: Sized {
    type Error;
    fn is_well_signed(&self) -> Result<(), Self::Error>;
fn dangerously_assume_wellsigned(self) -> T; fn check_signature(self) -> Result<T, Self::Error> { ... } }
Expand description

A cryptographically signed object that can be validated without additional public keys.

It’s better to wrap things in a SelfSigned than to give them an is_valid() method, so that you can make sure that nobody uses the object before checking it. It’s better to wrap things in a SelfSigned than to check them immediately, since you might want to defer the signature checking operation to another thread.

Associated Types

An error type that’s returned when the object is not well-signed.

Required methods

Check the signature on this object

Return the underlying object without checking its signature.

Provided methods

Unwrap this object if the signature is valid

Implementors