Expand description
§Willow Data Model
This crate provides implementation of the Willow Data Model, including:
- Traits to assist in your implementation of Willow parameters, such as
NamespaceIdandSubspaceId. - A zero-copy implementation of Willow paths and their constituent components.
- An implementation of Willow’s entries.
- Utilities for Willow’s entry groupings, such as ranges and areas
- Implementations of various relative encodings.
This crate does not yet have anything for Willow’s concept of stores. Stay tuned!
§Type parameters
Willow is a parametrised family of protocols, and so this crate makes heavy use of generic parameters.
The following generic parameter names are used consistently across this crate:
MCL- Ausizerepresentingmax_component_length.MCC- Ausizerepresentingmax_component_count.MPL- Ausizerepresentingmax_path_length.N- The type used forNamespaceId(willowprotocol.org), must implement theNamespaceIdtrait.S- The type used forSubspaceId(willowprotocol.org), must implement theSubspaceIdtrait.PD- The type used forPayloadDigest(willowprotocol.org), must implement thePayloadDigesttrait.AT- The type used forAuthorisationToken(willowprotocol.org), must implement theAuthorisationTokentrait.
Modules§
Structs§
- Authorised
Entry - An AuthorisedEntry is a pair of an
EntryandAuthorisationTokenfor which [Entry::is_authorised_write] returns true. Definition. - Component
- A component of a Willow Path.
- Entry
- The metadata associated with each Payload. Definition.
- Owned
Component - An owned component of a Willow Path that uses reference counting for cheap cloning.
- Path
- An immutable Willow path. Thread-safe, cheap to clone, cheap to take prefixes of, expensive to append to.
- Unauthorised
Write Error - An error indicating an
AuthorisationTokendoes not authorise the writing of this entry.
Enums§
- Invalid
Path Error - An error arising from trying to construct a invalid
Pathfrom valid components.
Traits§
- Authorisation
Token - Determines whether this type (nominally a
AuthorisationToken) is able to prove write permission for a givenEntry. - Namespace
Id - A type for identifying namespaces. Definition.
- Payload
Digest - A totally ordered type for content-addressing the data that Willow stores. Definition.
- Subspace
Id - A type for identifying subspaces. Definition.
Type Aliases§
- Timestamp
- A Timestamp is a 64-bit unsigned integer, that is, a natural number between zero (inclusive) and 2^64 (exclusive). Timestamps are to be interpreted as a time in microseconds since the Unix epoch. Definition.