Expand description
A list someone arranges, of items that carry their own ids: Ordered.
Collection keeps each item’s id beside it, which
is right when the id is only the collection’s business. Items that carry
their id themselves (Identified) — an effect in a clip’s stack, a step
in a recipe — read best as a plain vector, so Ordered<T> holds them as a
Vec<T> in memory and stores them exactly as a Collection is stored:
a map from id to { k: order key, v: value }. Editing an item writes only
that item, a move rewrites one order key, concurrent inserts interleave
deterministically and a delete never disturbs another item’s identity —
none of which a list stored by position can promise.
Structs§
- Arranged
Orderedstorage: a map from id to{ k: order key, v: value }, as aCollectionis stored.
Type Aliases§
- Ordered
- Items in the order they were arranged, stored under the ids they carry. See the module docs.