pub trait Fragment: Serialize + Deserialize {
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).
Required Associated Types§
type Id: FragmentId
Required Methods§
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.