pub enum ElementNode {
Container {
props: Props,
children: Vec<ElementNode>,
},
Image {
props: Props,
},
Rect {
props: Props,
},
Text {
props: Props,
content: &'static str,
},
}Expand description
A renderable UI element.
Containers own child elements; image, rectangle, and text nodes are leaves.
Variants§
Container
A layout container that can draw a background and render child elements.
Fields
§
children: Vec<ElementNode>Child elements, rendered in vector order.
Image
An image loaded from a local file or, when an HTTP client feature is enabled, a URL.
Rect
A filled rectangle.
Text
Text rendered from a string.
Auto Trait Implementations§
impl Freeze for ElementNode
impl RefUnwindSafe for ElementNode
impl Send for ElementNode
impl Sync for ElementNode
impl Unpin for ElementNode
impl UnsafeUnpin for ElementNode
impl UnwindSafe for ElementNode
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