pub trait PrimaryKey {
type InputKey: ?Sized;
type OutputKey: ?Sized;
// Required method
fn primary_key(key: &Self::InputKey) -> &Self::OutputKey;
}
Expand description
The trait that allows to convert the key of the table into the key of the metadata table. If the key comprises several entities, it is possible to build a Merkle tree over different primary keys. The trait defines the key over which to build an SMT.
Required Associated Types§
Required Methods§
sourcefn primary_key(key: &Self::InputKey) -> &Self::OutputKey
fn primary_key(key: &Self::InputKey) -> &Self::OutputKey
Converts the key of the table into the primary key of the metadata table.
Object Safety§
This trait is not object safe.