pub enum UiNodeKind {
Panel {
label: Option<String>,
},
Text {
text: String,
},
Button {
label: String,
action: UiActionId,
},
Slider {
label: String,
value: f32,
minimum: f32,
maximum: f32,
step: Option<f32>,
action: UiActionId,
},
TextInput {
label: String,
value: String,
max_bytes: u16,
action: UiActionId,
},
Toggle {
label: String,
value: bool,
action: UiActionId,
},
ImageResource {
resource: UiResourceId,
alt: String,
},
}Expand description
Semantic role and typed values of a UI node.
Variants§
Panel
A noninteractive visual grouping surface.
Text
Noninteractive visible text.
Button
An activatable command.
Slider
A bounded scalar input.
TextInput
A bounded UTF-8 text input.
Toggle
A Boolean input.
ImageResource
An adapter-resolved image with an accessible text alternative.
Trait Implementations§
Source§impl Clone for UiNodeKind
impl Clone for UiNodeKind
Source§fn clone(&self) -> UiNodeKind
fn clone(&self) -> UiNodeKind
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 UiNodeKind
impl Debug for UiNodeKind
Source§impl<'de> Deserialize<'de> for UiNodeKind
impl<'de> Deserialize<'de> for UiNodeKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for UiNodeKind
impl PartialEq for UiNodeKind
Source§fn eq(&self, other: &UiNodeKind) -> bool
fn eq(&self, other: &UiNodeKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UiNodeKind
impl Serialize for UiNodeKind
impl StructuralPartialEq for UiNodeKind
Auto Trait Implementations§
impl Freeze for UiNodeKind
impl RefUnwindSafe for UiNodeKind
impl Send for UiNodeKind
impl Sync for UiNodeKind
impl Unpin for UiNodeKind
impl UnsafeUnpin for UiNodeKind
impl UnwindSafe for UiNodeKind
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