Skip to main content

Node

Enum Node 

Source
pub enum Node {
Show 14 variants Container { id: Option<String>, style: Option<String>, padding: Padding, children: Vec<Node>, }, Text { content: String, style: Option<String>, attrs: TextAttrs, }, Row { spacing: Option<f32>, padding: Padding, width: Option<Length>, height: Option<Length>, align_y: Option<Vertical>, clip: Option<bool>, children: Vec<Node>, }, Column { spacing: Option<f32>, padding: Padding, width: Option<Length>, height: Option<Length>, max_width: Option<f32>, align_x: Option<Horizontal>, clip: Option<bool>, children: Vec<Node>, }, Button { style: Option<String>, padding: Padding, width: Option<Length>, height: Option<Length>, clip: Option<bool>, on_press: Option<String>, on_press_with: Option<String>, on_press_maybe: Option<String>, children: Vec<Node>, }, Stack { width: Option<Length>, height: Option<Length>, clip: Option<bool>, children: Vec<Node>, }, Space { width: Option<Length>, height: Option<Length>, }, TextInput {
Show 15 fields placeholder: String, value: String, id: Option<String>, secure: Option<bool>, on_input: Option<String>, on_submit: Option<String>, on_submit_maybe: Option<String>, on_paste: Option<String>, width: Option<Length>, padding: Padding, size: Option<f32>, line_height: Option<LineHeight>, align_x: Option<Horizontal>, style: Option<String>, font: Option<String>,
}, Checkbox {
Show 13 fields label: String, is_checked: String, on_toggle: Option<String>, on_toggle_maybe: Option<String>, size: Option<f32>, width: Option<Length>, spacing: Option<f32>, text_size: Option<f32>, text_line_height: Option<LineHeight>, text_shaping: Option<Shaping>, text_wrapping: Option<Wrapping>, style: Option<String>, font: Option<String>,
}, If { condition: String, true_branch: Box<Node>, false_branch: Option<Box<Node>>, }, ForEach { iterable: String, body: Box<Node>, }, Widget { method: String, args: Vec<String>, child: Option<Box<Node>>, }, VerticalSlider { range_start: f32, range_end: f32, value: String, on_change: String, default: Option<f32>, on_release: Option<String>, width: Option<f32>, height: Option<Length>, step: Option<String>, shift_step: Option<f32>, }, Tooltip { position: TooltipPosition, gap: Option<f32>, padding: Option<f32>, delay: Option<u64>, snap_within_viewport: Option<bool>, style: Option<String>, children: Vec<Node>, },
}

Variants§

§

Container

Fields

§padding: Padding
§children: Vec<Node>
§

Text

Fields

§content: String
§

Row

Fields

§spacing: Option<f32>
§padding: Padding
§height: Option<Length>
§align_y: Option<Vertical>
§clip: Option<bool>
§children: Vec<Node>
§

Column

Fields

§spacing: Option<f32>
§padding: Padding
§height: Option<Length>
§max_width: Option<f32>
§clip: Option<bool>
§children: Vec<Node>
§

Button

Fields

§padding: Padding
§height: Option<Length>
§clip: Option<bool>
§on_press: Option<String>
§on_press_with: Option<String>
§on_press_maybe: Option<String>
§children: Vec<Node>
§

Stack

Fields

§height: Option<Length>
§clip: Option<bool>
§children: Vec<Node>
§

Space

Fields

§height: Option<Length>
§

TextInput

Fields

§placeholder: String
§value: String
§secure: Option<bool>
§on_input: Option<String>
§on_submit: Option<String>
§on_submit_maybe: Option<String>
§on_paste: Option<String>
§padding: Padding
§size: Option<f32>
§line_height: Option<LineHeight>
§

Checkbox

Fields

§label: String
§is_checked: String
§on_toggle: Option<String>
§on_toggle_maybe: Option<String>
§size: Option<f32>
§spacing: Option<f32>
§text_size: Option<f32>
§text_line_height: Option<LineHeight>
§text_shaping: Option<Shaping>
§text_wrapping: Option<Wrapping>
§

If

Fields

§condition: String
§true_branch: Box<Node>
§false_branch: Option<Box<Node>>
§

ForEach

Fields

§iterable: String
§body: Box<Node>
§

Widget

Fields

§method: String
§args: Vec<String>
§child: Option<Box<Node>>
§

VerticalSlider

Fields

§range_start: f32
§range_end: f32
§value: String
§on_change: String
§default: Option<f32>
§on_release: Option<String>
§width: Option<f32>
§height: Option<Length>
§shift_step: Option<f32>
§

Tooltip

Fields

§padding: Option<f32>
§delay: Option<u64>
§snap_within_viewport: Option<bool>
§children: Vec<Node>

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnsafeUnpin for Node

§

impl UnwindSafe for Node

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