Skip to main content

Module groupings

Module groupings 

Source
Expand description

Groupings of entries in 3d space.

This module implements the groupings used by the Willow specifications:

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 Area is 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 some Path, and a TimeRange.
AreaOfInterest
An AreaOfInterest is an Area together with a maximum number of entries it may include, and a maximum sum of total payload_lengths for the included entries.
ClosedRange
A non-empty closed range with an inclusive start value and a strictly-greater exclusive end value.
EmptyGrouping
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, a PathRange, and a TimeRange.

Enums§

WillowRange
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).
CoordinatelikeExt
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.
KeylikeExt
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 Arbitrary area which is guaranteed to be included in the reference area.
subspace_includes_subspace
Returns true if the outer Option<S> includes the inner Option<S>, where None denotes interest in all subspaces of the namespace.

Type Aliases§

NonZeroU64
A u64 that is known not to equal zero.
PathRange
A WillowRange of Paths.
SubspaceRange
A WillowRange of SubspaceIds.
TimeRange
A WillowRange of Timestamps.