pub struct Description {
pub name: String,
pub doc: String,
pub props: Vec<Prop>,
pub parts: Vec<Part>,
pub events: Vec<Event>,
pub bindings: Vec<Binding>,
pub state: Vec<State>,
pub semantics: Semantics,
}Expand description
One described component.
Fields§
§name: StringThe widget’s name, as code calls it (ListRow).
doc: StringThe widget’s doc text.
props: Vec<Prop>§parts: Vec<Part>§events: Vec<Event>§bindings: Vec<Binding>§state: Vec<State>§semantics: SemanticsImplementations§
Source§impl Description
impl Description
pub fn prop(&self, name: &str) -> Option<&Prop>
pub fn part(&self, name: &str) -> Option<&Part>
Sourcepub fn default_part(&self) -> Option<&Part>
pub fn default_part(&self) -> Option<&Part>
The part a component’s block fills when it names none.
pub fn event(&self, name: &str) -> Option<&Event>
pub fn binding(&self, name: &str) -> Option<&Binding>
pub fn state(&self, name: &str) -> Option<&State>
Sourcepub fn positional(&self) -> impl Iterator<Item = &Prop>
pub fn positional(&self) -> impl Iterator<Item = &Prop>
The props given by position, in order.
Trait Implementations§
Source§impl Clone for Description
impl Clone for Description
Source§impl Debug for Description
impl Debug for Description
Source§impl<'de> Deserialize<'de> for Description
impl<'de> Deserialize<'de> for Description
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 Description
impl PartialEq for Description
Source§impl Serialize for Description
impl Serialize for Description
impl StructuralPartialEq for Description
Auto Trait Implementations§
impl Forget for Description
impl Freeze for Descriptionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Prop>: Freeze,
PhantomData<Part>: Freeze,
PhantomData<Event>: Freeze,
PhantomData<Binding>: Freeze,
PhantomData<State>: Freeze,
impl Move for Description
impl RefUnwindSafe for Description
impl Send for Description
impl Sync for Description
impl Unpin for Description
impl UnsafeUnpin for Descriptionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Prop>: UnsafeUnpin,
PhantomData<Part>: UnsafeUnpin,
PhantomData<Event>: UnsafeUnpin,
PhantomData<Binding>: UnsafeUnpin,
PhantomData<State>: UnsafeUnpin,
impl UnwindSafe for Description
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