Expand description
Groupings of entries in 3d space.
This module implements the groupings used by the Willow specifications:
- ranges (
WillowRange), - 3d ranges (
Range3d), - areas (
Area), and - areas of interest (
AreaOfInterest).
Our implementations center around two traits: Coordinatelike describes values which fall into some position in three-dimensional Willow space, and Grouping describes groupings of values based on their position in three-dimensional Willow space. The CoordinatelikeExt trait then provides convenient methods for checking which values are included in which groupings.
use willow_data_model::prelude::*;
let entry = Entry::builder()
.namespace_id(Family)
.subspace_id(Betty)
.path(Path::<4, 4, 4>::new())
.timestamp(12345)
.payload_digest("some_hash")
.payload_length(17)
.build();
assert!(entry.wdm_is_in(&Range3d::full()));Modules§
- private_
interest - Provides abstractions for privately encoding areas relative to other areas and private interests.
Structs§
- Area
- An
Areais a box in three-dimensional willow space, consisting of all entries matching either a single subspace id or entries of arbitrary subspace ids, prefixed by somePath, and aTimeRange. - Area
OfInterest - An
AreaOfInterestis anAreatogether with a maximum number of entries it may include, and a maximum sum of total payload_lengths for the included entries. - Closed
Range - A non-empty closed range with an inclusive start value and a strictly-greater exclusive end value.
- Empty
Grouping - An error returned whenever an operation would result in an empty grouping.
- Range3d
- An arbitrary box in three-dimensional willow space, consisting of a
SubspaceRange, aPathRange, and aTimeRange.
Enums§
- Willow
Range - A non-empty continuous subset of a type implementing
PartialOrd.
Traits§
- Coordinatelike
- A coordinatelike value represents a point in the three-dimensional willow space (within a given namespace).
- Coordinatelike
Ext - Methods for working with
Coordinatelikes. - Grouping
- A grouping of entries.
- Keylike
- A keylike value is one that can be used to uniquely identify an Entry within a namespace-specific store.
- Keylike
Ext - Methods for working with
Keylikes. - Namespaced
- A namespaced value is one with an associated namespace id (of type
N).
Functions§
- arbitrary_
area_ in_ area - Returns an
Arbitraryarea which is guaranteed to be included in the reference area. - subspace_
includes_ subspace - Returns
trueif the outerOption<S>includes the innerOption<S>, whereNonedenotes interest in all subspaces of the namespace.
Type Aliases§
- NonZero
U64 - A
u64that is known not to equal zero. - Path
Range - A
WillowRangeof Paths. - Subspace
Range - A
WillowRangeof SubspaceIds. - Time
Range - A
WillowRangeof Timestamps.