Skip to main content

TreeError

Enum TreeError 

Source
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.

Fields

§parent: NodeId

The parent node.

§child: NodeId

The missing child node.

§

NoParentEntry(NodeId)

Live node has no parent-map entry.

§

ParentMissing

Parent ID points to a deallocated arena slot.

Fields

§parent: NodeId

The missing parent node.

§child: NodeId

The child node.

§

ParentChildMismatch

Parent map and child list disagree.

Fields

§parent: NodeId

The parent node.

§child: NodeId

The child node.

§

ChildListedMultipleTimes

Child appears under two different containers.

Fields

§child: NodeId

The duplicated child node.

§first_parent: NodeId

The first container that listed the child.

§second_parent: NodeId

The second container that listed the child.

§

DisconnectedNode(NodeId)

Live node unreachable from root.

§

EmptyKind

Panel kind is an empty string.

§

NoKinds

§

ActiveOutOfBounds

Fields

§active: usize

The active index.

§len: usize

The number of panels.

§

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.

Fields

§width: u32

The duplicated minimum width.

§

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

Fields

§index: usize

The requested index.

§len: usize

The container’s child count.

§

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 Debug for TreeError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TreeError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TreeError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.