Enum UiNode
pub enum UiNode {
Column {
id: String,
children: Vec<UiNode>,
gap: Option<f32>,
no_padding: bool,
intrinsic_height: bool,
fill_remaining_height: bool,
},
Row {
id: String,
children: Vec<UiNode>,
no_wrap: bool,
fill_remaining_height: bool,
},
Container {
id: String,
child: Box<UiNode>,
background: bool,
no_padding: bool,
fill_height: bool,
width: Option<f32>,
height: Option<f32>,
},
Text {
id: String,
text: UiTextSource,
role: UiTextRole,
},
Button {
id: String,
label: String,
accessible_name: Option<String>,
tooltip: Option<String>,
on_click_path: Option<String>,
click_value: Option<String>,
navigate: Option<UiNavigation>,
enabled: bool,
role: UiButtonRole,
},
TextInput {
id: String,
label: Option<String>,
accessible_name: String,
placeholder: String,
value_path: Option<String>,
initial_value: String,
multiline: bool,
disabled: bool,
},
Checkbox {
id: String,
label: Option<String>,
accessible_name: String,
value_path: String,
enabled: bool,
},
Toggle {
id: String,
label: Option<String>,
accessible_name: String,
value_path: String,
enabled: bool,
},
Component {
id: String,
name: String,
props: Map<String, Value>,
},
Spacer {
id: String,
},
}Variants§
Column
Fields
Row
Container
Fields
Text
Button
Fields
§
on_click_path: Option<String>Where a click is reported to the app: the app takes it from the
graph’s UiValues by this path and acts on it. The button never
writes the document.
§
role: UiButtonRoleTextInput
Fields
Checkbox
Toggle
Component
App-owned retained widget built by a process-local component factory.
Fields
Spacer
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for UiNode
impl<'de> Deserialize<'de> for UiNode
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for UiNode
impl Serialize for UiNode
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for UiNode
Auto Trait Implementations§
impl Freeze for UiNode
impl RefUnwindSafe for UiNode
impl Send for UiNode
impl Sync for UiNode
impl Unpin for UiNode
impl UnsafeUnpin for UiNode
impl UnwindSafe for UiNode
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more