pub enum LayoutError {
NullLeaf,
DuplicatePane(PaneId),
BadRatio(f32),
}Expand description
Why a LayoutNode failed LayoutNode::validate. Every variant
names a structurally-illegal tree so the invariant violation is a
typed value, not a silent mis-render (UNREPRESENTABILITY: a tree
that fails to validate never reaches the renderer).
Variants§
NullLeaf
A leaf carries PaneId::NULL — a dangling reference left by a
botched removal. The renderer would draw a blank hole.
DuplicatePane(PaneId)
The same PaneId appears in two leaves. A pane belongs to
exactly one slot; aliasing means two views fight over one PTY.
BadRatio(f32)
A split’s ratio is not in the open interval (0.0, 1.0) — a 0 or
1 (or NaN/out-of-range) ratio means one side is unrepresentable.
Trait Implementations§
Source§impl Clone for LayoutError
impl Clone for LayoutError
Source§fn clone(&self) -> LayoutError
fn clone(&self) -> LayoutError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutError
impl Debug for LayoutError
Source§impl PartialEq for LayoutError
impl PartialEq for LayoutError
impl StructuralPartialEq for LayoutError
Auto Trait Implementations§
impl Freeze for LayoutError
impl RefUnwindSafe for LayoutError
impl Send for LayoutError
impl Sync for LayoutError
impl Unpin for LayoutError
impl UnsafeUnpin for LayoutError
impl UnwindSafe for LayoutError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more