pub enum A2UIComponent {
Column {
children: A2UIChildren,
spacing: Option<String>,
},
Row {
children: A2UIChildren,
spacing: Option<String>,
},
Text {
text: A2UITextValue,
usage_hint: Option<String>,
},
Button {
label: A2UITextValue,
action: Option<String>,
},
Input {
placeholder: Option<String>,
value: Option<A2UITextValue>,
on_change: Option<String>,
},
Image {
src: String,
alt: Option<String>,
},
Markdown {
content: A2UITextValue,
},
Code {
content: A2UITextValue,
language: Option<String>,
},
Progress {
value: f64,
max: Option<f64>,
},
Spacer {
size: Option<String>,
},
Divider,
}Expand description
A2UI component types.
Variants§
Column
Container column
Row
Container row
Text
Text element
Button
Button element
Input
Input field
Image
Image element
Markdown
Markdown content
Fields
§
content: A2UITextValueCode
Code block
Progress
Progress indicator
Spacer
Spacer
Divider
Divider
Trait Implementations§
Source§impl Clone for A2UIComponent
impl Clone for A2UIComponent
Source§fn clone(&self) -> A2UIComponent
fn clone(&self) -> A2UIComponent
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 A2UIComponent
impl Debug for A2UIComponent
Source§impl<'de> Deserialize<'de> for A2UIComponent
impl<'de> Deserialize<'de> for A2UIComponent
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 A2UIComponent
impl RefUnwindSafe for A2UIComponent
impl Send for A2UIComponent
impl Sync for A2UIComponent
impl Unpin for A2UIComponent
impl UnsafeUnpin for A2UIComponent
impl UnwindSafe for A2UIComponent
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