pub trait Fragment: Serialize {
    type Id: FragmentId;

    // Required method
    fn id(&self) -> Self::Id;
}
Expand description

A fragment is some item contained in a block, such as a transaction, a delegation-related certificate, an update proposal, and so on. Fragments can be serialized (so that they can be concatenated to form a binary block( and have a unique ID (typically the hash of their serialization). TODO: add a Readable trait bound

Required Associated Types§

Required Methods§

source

fn id(&self) -> Self::Id

Return the message’s identifier.

Implementors§