pub enum UiComponentType {
Label {
text: String,
},
Button {
text: String,
enabled: bool,
},
TextEdit {
value: String,
hint: String,
},
SelectableValue {
options: Vec<String>,
selected: usize,
},
ComboBox {
options: Vec<String>,
selected: Option<usize>,
placeholder: String,
},
Toggle {
value: bool,
},
Horizontal {
children: Vec<UiComponent>,
},
Vertical {
children: Vec<UiComponent>,
},
}
Variants§
Label
Button
TextEdit
SelectableValue
ComboBox
Toggle
Horizontal
Fields
§
children: Vec<UiComponent>
Vertical
Fields
§
children: Vec<UiComponent>
Trait Implementations§
Source§impl Clone for UiComponentType
impl Clone for UiComponentType
Source§fn clone(&self) -> UiComponentType
fn clone(&self) -> UiComponentType
Returns a duplicate of the value. Read more
1.0.0 · 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 UiComponentType
impl Debug for UiComponentType
Source§impl<'de> Deserialize<'de> for UiComponentType
impl<'de> Deserialize<'de> for UiComponentType
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
Auto Trait Implementations§
impl Freeze for UiComponentType
impl RefUnwindSafe for UiComponentType
impl Send for UiComponentType
impl Sync for UiComponentType
impl Unpin for UiComponentType
impl UnwindSafe for UiComponentType
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