pub trait Entrylike<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD>: Coordinatelike<MCL, MCC, MPL, S> {
// Required methods
fn wdm_namespace_id(&self) -> &N;
fn wdm_payload_length(&self) -> u64;
fn wdm_payload_digest(&self) -> &PD;
}Expand description
A trait describing the metadata associated with each Willow Payload string.
Entries are the central concept in Willow. In order to make any bytestring of data accessible to Willow, you need to create an Entry describing its metadata. Specifically, an Entry consists of
- a namespace_id (roughly, this addresses a universe of Willow data, fully independent from all data (i.e., Entries) of different namespace ids) of type
N, - a subspace_id (roughly, a fully indendent part of a namespace, typically subspaces correspond to individual users) of type
S, - a path (roughly, a file-system-like way of arranging payloads hierarchically within a subspace) of type
Path, - a timestamp (newer Entries can overwrite certain older Entries),
- a payload_length (the length of the payload string), and
- a payload_digest (a secure hash of the payload string being inserted into Willow).
This trait can be implemented by all types which provide at least this information. We use this trait in order to be able to abstract over specific implementations of entries. If you want a concrete type for representing entries, use the Entry struct.
Required Methods§
Sourcefn wdm_namespace_id(&self) -> &N
fn wdm_namespace_id(&self) -> &N
Returns the namespace_id of self.
Sourcefn wdm_payload_length(&self) -> u64
fn wdm_payload_length(&self) -> u64
Returns the payload_length of self.
Sourcefn wdm_payload_digest(&self) -> &PD
fn wdm_payload_digest(&self) -> &PD
Returns the payload_digest of self.