Skip to main content

LayoutProblem

Enum LayoutProblem 

Source
#[non_exhaustive]
pub enum LayoutProblem {
Show 22 variants TooManyNodes, TooDeep, TooManyTexts, TooManyIsolated, MixedContent, DisplayOnLeaf, ContainerFieldOnLeaf, RootItemField, GridFieldOnFlex(&'static str), FlexFieldOnGrid(&'static str), FlexItemFieldInGrid(&'static str), GridItemFieldInFlex(&'static str), TooManyTracks, RepeatCount, RepeatInAutoTracks, AutoRepeatNeedsFixedTracks, GridLineOutOfRange, InvalidKeyframes, OutOfRange, LengthKeyframesDiffer, PaintKeyframesDiffer, TextKeyframesInterpolate,
}
Expand description

Why a layout tree is invalid.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

TooManyNodes

More than MAX_LAYOUT_NODES nodes.

§

TooDeep

Nodes nested deeper than MAX_LAYOUT_DEPTH.

§

TooManyTexts

More than MAX_LAYOUT_TEXTS nodes with text.

§

TooManyIsolated

More than MAX_LAYOUT_ISOLATED nodes with a visual field or hidden overflow.

§

MixedContent

A node with more than one of children, text, and shape.

§

DisplayOnLeaf

display on a node with text or shape content.

§

ContainerFieldOnLeaf

A container field on a node with text or shape content.

§

RootItemField

A size, margin, position, or item field on the root.

§

GridFieldOnFlex(&'static str)

A grid container field (named) on a flex container.

§

FlexFieldOnGrid(&'static str)

A flex container field (named) on a grid container.

§

FlexItemFieldInGrid(&'static str)

A flex item field (named) on a grid’s child.

§

GridItemFieldInFlex(&'static str)

A grid item field (named) on a flex container’s child.

§

TooManyTracks

More than MAX_GRID_TRACKS explicit tracks on one axis.

§

RepeatCount

A repeat() count outside 1 to 64.

§

RepeatInAutoTracks

repeat() in implicit track sizes.

§

AutoRepeatNeedsFixedTracks

An auto-fill or auto-fit repeat beside another, or with a track (in it or beside it) without a fixed size.

§

GridLineOutOfRange

A grid line outside -65 to 65, line 0, or a span outside 1 to 64.

§

InvalidKeyframes

Keyframes that are empty, out of order, or have an unusable curve.

§

OutOfRange

A value that is not finite or outside its range.

§

LengthKeyframesDiffer

Size keyframes that mix a percent with a length.

§

PaintKeyframesDiffer

Paint keyframes that differ in kind, stop count, or spread.

§

TextKeyframesInterpolate

A text keyframe whose interpolation is not hold.

Trait Implementations§

Source§

impl Clone for LayoutProblem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LayoutProblem

Source§

impl Debug for LayoutProblem

Source§

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

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

impl Display for LayoutProblem

Source§

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

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

impl Eq for LayoutProblem

Source§

impl PartialEq for LayoutProblem

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayoutProblem

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.