cranpose_core/slot_storage.rs
1//! Slot storage helper types used by [`crate::SlotTable`].
2//!
3//! The slot table is the single storage implementation in this crate. These
4//! helpers keep the call sites readable without reintroducing an abstraction
5//! layer around that single concrete type.
6
7use crate::AnchorId;
8use crate::RecomposeScope;
9
10/// Opaque handle to a group in the slot storage.
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
12pub struct GroupId(pub(crate) usize);
13
14/// Result of starting a scoped group.
15pub struct StartScopedGroup<G> {
16 pub group: G,
17 pub anchor: AnchorId,
18 pub scope: RecomposeScope,
19 /// True if preserved structure was reused and children must recompose.
20 pub requires_recompose: bool,
21}