pub enum TreeError {
Show 35 variants
RootNotSet,
RootAlreadySet,
RootMissing(NodeId),
PanelIdExhausted,
OverlayIdExhausted,
ArenaOverflow,
ArenaIndexOverflow,
MissingChild {
parent: NodeId,
child: NodeId,
},
NoParentEntry(NodeId),
ParentMissing {
parent: NodeId,
child: NodeId,
},
ParentChildMismatch {
parent: NodeId,
child: NodeId,
},
ChildListedMultipleTimes {
child: NodeId,
first_parent: NodeId,
second_parent: NodeId,
},
DisconnectedNode(NodeId),
EmptyKind,
NoKinds,
ActiveOutOfBounds {
active: usize,
len: usize,
},
DashboardNoCards,
DashboardNoColumns,
DashboardMinWidthInvalid,
WindowSizeZero,
EmptyAfterRebuild,
NoRoot,
SnapshotNoRoot,
SnapshotFocusedMissingFromSequence(PanelId),
SnapshotCollapsedMissingFromSequence(PanelId),
NoBreakpoints,
DuplicateBreakpointWidth {
width: u32,
},
SnapshotTooDeep(usize),
SnapshotSpanRequiresPanel(&'static str),
UnsupportedSnapshotNode(NodeId),
InsertOutOfBounds {
index: usize,
len: usize,
},
TaffyError(Box<str>),
NodeKindAndType,
UnknownNodeType(Box<str>),
NodeMissingKindOrType,
}Expand description
Broken tree structural invariant.
Returned by LayoutTree::validate and
builder finalization. Most variants indicate an internal bug rather than
invalid user input.
Variants§
RootNotSet
RootAlreadySet
RootMissing(NodeId)
Root ID points to a deallocated arena slot.
PanelIdExhausted
OverlayIdExhausted
ArenaOverflow
ArenaIndexOverflow
MissingChild
Container references a child absent from the arena.
NoParentEntry(NodeId)
Live node has no parent-map entry.
ParentMissing
Parent ID points to a deallocated arena slot.
ParentChildMismatch
Parent map and child list disagree.
ChildListedMultipleTimes
Child appears under two different containers.
Fields
DisconnectedNode(NodeId)
Live node unreachable from root.
EmptyKind
Panel kind is an empty string.
NoKinds
ActiveOutOfBounds
DashboardNoCards
DashboardNoColumns
DashboardMinWidthInvalid
WindowSizeZero
EmptyAfterRebuild
Strategy rebuild produced zero nodes.
NoRoot
SnapshotNoRoot
SnapshotFocusedMissingFromSequence(PanelId)
Focused panel not in the snapshot’s panel sequence.
SnapshotCollapsedMissingFromSequence(PanelId)
Collapsed panel not in the snapshot’s panel sequence.
NoBreakpoints
DuplicateBreakpointWidth
Duplicate minimum-width value across adaptive breakpoints.
SnapshotTooDeep(usize)
SnapshotSpanRequiresPanel(&'static str)
Span metadata on a non-panel grid item.
UnsupportedSnapshotNode(NodeId)
Node variant that cannot be serialized (e.g. TaffyPassthrough).
InsertOutOfBounds
TaffyError(Box<str>)
Taffy layout engine error during resolve.
NodeKindAndType
TOML node has both kind and type.
UnknownNodeType(Box<str>)
NodeMissingKindOrType
Trait Implementations§
Source§impl Error for TreeError
impl Error for TreeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()