Trait leaf_protocol::Component
source · pub trait Component:
HasBorshSchema
+ BorshDeserialize
+ BorshSerialize {
// Required method
fn schema_id() -> Digest;
// Provided method
fn make_data(&self) -> Result<ComponentData> { ... }
}Expand description
Trait implemented by Components in the Leaf data model.
Implementers should usually derive this using the Component
macro.
Required Methods§
Provided Methods§
fn make_data(&self) -> Result<ComponentData>
Object Safety§
This trait is not object safe.