willow-data-model 0.7.0

The core datatypes of Willow, an eventually consistent data store with improved distributed deletion.
Documentation
//! Functionality around Willow [Entries](https://willowprotocol.org/specs/data-model/index.html#Entry).
//!
//! 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`](EntryBuilder). 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));
//! ```

#[allow(clippy::module_inception)]
mod entry;
pub use entry::*;

mod entrylike;
pub use entrylike::*;