Skip to main content

Crate universal_weave

Crate universal_weave 

Source
Expand description

General-purpose building blocks for Loom implementations.

This library aims to make building Loom implementations easier by providing the following primitives:

Operations on the built-in Weave implementations always preserve node ordering through the use of IndexSet, and (non-tail) insertion and removal operations on ordered sets can have a worst-case time complexity of O(n).

Efficient (de)serialization is supported using rkyv and serde. Basic functionality for versioning serialized data is provided by VersionedBytes (requires rkyv feature to be enabled).

Re-exports§

pub use contracts;
pub use hashbrown;
pub use indexmap;
pub use glam;
pub use tinyvec;
pub use rkyv;

Modules§

dependent
DependentWeave is a tree-based Weave where each Node depends on the contents of the previous Node.
independent
IndependentWeave is a DAG-based Weave where each Node does not depend on the contents of the previous Node.
layout
Weave rendering helpers.
versioning
Utilities for versioning serialized binary data.
wrappers
Wrappers which add additional functionality to Weave implementations.

Enums§

DiscreteContentResult
A type representing the results of an action on a DiscreteContents item.
LayoutItem
A geometric item within an arrangement of a Weave’s content.

Traits§

ActivePathWeave
A Weave where every Node in the active path is always considered active.
ActiveSingularWeave
A Weave where only one Node can be considered active at a time.
BookmarkableWeave
A Weave where nodes can be bookmarked.
DeduplicatableContents
Node contents which can be meaningfully deduplicated.
DiscreteContents
Node contents which can be split apart or merged together.
DiscreteWeave
A Weave where the contents of Node objects can be split and merged.
ImmutableActivePathWeave
An ImmutableWeave where every Node in the active path is always considered active.
ImmutableActiveSingularWeave
An ImmutableWeave where only one Node can be considered active at a time.
ImmutableBookmarkableWeave
An ImmutableWeave where nodes can be bookmarked.
ImmutableLayouter
An algorithm which arranges an ImmutableWeave’s content for graphical rendering in an efficiently accessible form.
ImmutableMetadataWeave
An ImmutableWeave containing document-wide metadata.
ImmutableWeave
A read-only Weave.
IndependentContents
Node contents which do not depend on the contents of other Node objects in order to be meaningful.
IndependentWeave
A Weave where Node objects do not depend on their parents in order to be meaningful.
Layouter
An algorithm which arranges a Weave’s content for graphical rendering in an efficiently accessible form.
MetadataWeave
A Weave containing document-wide metadata.
Node
An item within a Weave which can be connected to other items.
SemiIndependentWeave
A Weave where Node objects do not depend on the contents of their parents in order to be meaningful.
SortableBookmarkableWeave
A Weave where the ordering of bookmarked nodes is stable and can be user-defined.
SortableWeave
A Weave where the ordering of nodes is stable and can be user-defined.
Weave
A document linking together multiple Node objects without cyclical links.