Skip to main content

Module entry

Module entry 

Source
Expand description

Functionality around Willow Entries.

Entries are the metadata by which payload strings are identified in Willow — see the Entry struct for more information.

Applications can construct concrete entries via EntryBuilders. Code which merely needs to inspect entries should make use of the Entrylike trait, however. This trait describes exactly which information an entry provides, and lets code abstract over any specific representation (such as the Entry struct) of entries.

use willow_data_model::prelude::*;

let entry = Entry::builder()
    .namespace_id("family")
    .subspace_id("alfie")
    .path(Path::<4, 4, 4>::new())
    .timestamp(12345)
    .payload_digest("some_hash")
    .payload_length(17)
    .build();

assert_eq!(*entry.wdm_subspace_id(), "alfie");

let newer = Entry::prefilled_builder(&entry).timestamp(99999).build();
assert!(newer.wdm_prunes(&entry));

Modules§

entry_builder
Tools for manipulating the type state of EntryBuilder.

Structs§

Entry
The metadata associated with each Willow Payload string.
EntryBuilder
Use builder syntax to set the inputs and finish with build().

Traits§

Entrylike
A trait describing the metadata associated with each Willow Payload string.
EntrylikeExt
Methods for working with Entrylikes.