SignatureItemParseable

Trait SignatureItemParseable 

Source
pub trait SignatureItemParseable: Sized {
    // Required method
    fn from_unparsed_and_body(
        item: UnparsedItem<'_>,
        document_body: &SignatureHashInputs<'_>,
    ) -> Result<Self, ErrorProblem>;
}
Available on crate feature parse2 only.
Expand description

A signature item that can appear in a netdoc

This is the type T of a field item: T in a netdoc signatures section type.

Types that implement this embody both:

  • The item, parameters, and signature data, provided in the document.
  • The hash of the document body, which will needed during verification.

Typically derived with #[derive_deftly(ItemValueParseable)].

Normal (non-signature) items implement ItemValueParseable.

Required Methods§

Source

fn from_unparsed_and_body( item: UnparsedItem<'_>, document_body: &SignatureHashInputs<'_>, ) -> Result<Self, ErrorProblem>

Parse the item’s value

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§