pub struct DrawnNode {Show 14 fields
pub key: String,
pub component: String,
pub text: Option<String>,
pub variant: Option<String>,
pub field: Option<DrawnField>,
pub action: Option<String>,
pub tabs: Vec<String>,
pub show_all_text: Option<String>,
pub children: Vec<DrawnNode>,
pub chart: Option<DrawnChart>,
pub scene: Option<DrawnScene>,
pub depth: Option<DrawnDepth>,
pub extension: Option<DrawnExtension>,
pub accessibility: Option<DrawnAccessibility>,
}Expand description
One component of a drawing, resolved for a renderer: templates expanded, every string a person reads already in place (spec 3.3 §7.4 rule 5).
| Component | text | variant | Other |
|---|---|---|---|
Text | The text | h1–h5, caption, body | — |
Row, Column, List | — | justify (Row, Column) or direction (List) | children; a long List has showAllText |
Card | — | — | children |
Tabs | — | — | tabs titles and one child per tab |
Divider | — | axis | — |
Button | Its label | primary, default, borderless | action |
TextField, DateTimeInput, CheckBox, ChoicePicker, Slider | The label | the catalog’s variant | field |
Chart | — | — | chart: a chart an extension component’s home view draws |
Scene | — | — | scene: a 3D scene an extension component’s home view draws; its children are its panels, then its text view |
Depth | — | — | depth: the children an extension component’s home view holds, presented with CSS 3D |
An extension component, such as Metric | — | — | extension, and one child: what the home shows for it |
Fields§
§key: StringUnique within the drawing: the component’s id, and for a template’s copy the list
item it was drawn for, cell-0@/rows/3.
component: StringThe catalog component.
text: Option<String>What it reads, or its label.
variant: Option<String>A style hint from the catalog.
field: Option<DrawnField>A field the person fills in.
action: Option<String>The declared action a button asks for.
tabs: Vec<String>The titles of a Tabs’ tabs, one per child.
show_all_text: Option<String>A long list’s “Show all 42”, when a renderer cuts it.
children: Vec<DrawnNode>Its children, in order.
chart: Option<DrawnChart>A chart the home draws natively, from an extension component’s home view.
scene: Option<DrawnScene>A 3D scene the home draws natively, from an extension component’s home view.
depth: Option<DrawnDepth>How the home presents this node’s children in depth, from an extension component’s home view.
extension: Option<DrawnExtension>The extension component this node draws, for a host that draws it with its own renderer; every other surface draws its one child, what the home shows for it.
accessibility: Option<DrawnAccessibility>What assistive technology reads for it (A2UI 1.0 @accessibility), resolved and
checked by rule 5.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DrawnNode
impl<'de> Deserialize<'de> for DrawnNode
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>,
impl Eq for DrawnNode
Source§impl JsonSchema for DrawnNode
impl JsonSchema for DrawnNode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for DrawnNode
Auto Trait Implementations§
impl Forget for DrawnNode
impl Freeze for DrawnNodewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<DrawnOption>: Freeze,
PhantomData<DrawnCheck>: Freeze,
PhantomData<String>: Freeze,
PhantomData<DrawnNode>: Freeze,
PhantomData<ChartTick>: Freeze,
PhantomData<ChartSeries>: Freeze,
PhantomData<SceneObject>: Freeze,
PhantomData<SceneLight>: Freeze,
PhantomData<SceneTick>: Freeze,
PhantomData<SceneMotion>: Freeze,
PhantomData<ScenePanel>: Freeze,
impl Move for DrawnNode
impl RefUnwindSafe for DrawnNode
impl Send for DrawnNode
impl Sync for DrawnNode
impl Unpin for DrawnNode
impl UnsafeUnpin for DrawnNodewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<DrawnOption>: UnsafeUnpin,
PhantomData<DrawnCheck>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<DrawnNode>: UnsafeUnpin,
PhantomData<ChartTick>: UnsafeUnpin,
PhantomData<ChartSeries>: UnsafeUnpin,
PhantomData<SceneObject>: UnsafeUnpin,
PhantomData<SceneLight>: UnsafeUnpin,
PhantomData<SceneTick>: UnsafeUnpin,
PhantomData<SceneMotion>: UnsafeUnpin,
PhantomData<ScenePanel>: UnsafeUnpin,
impl UnwindSafe for DrawnNode
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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