Enum agui_core::widget::BuildResult[][src]

#[non_exhaustive]
pub enum BuildResult {
    Empty,
    One(WidgetRef),
    Many(Vec<WidgetRef>),
    Error(Box<dyn Error>),
}
Expand description

Encapsulates the result of a widget build() method.

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.

Empty

Indicates that the widget has no children.

One(WidgetRef)

Tuple Fields

The widget contains a single child.

Many(Vec<WidgetRef>)

Tuple Fields

The widget contains a many children.

Error(Box<dyn Error>)

Tuple Fields

0: Box<dyn Error>

The widget has failed to build properly, and should construction should halt.

Panics

Currently this results in a panic!(), however that may change in the future.

Implementations

Errors

Returns a boxed error if the widget failed to build correctly.

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.