struct
Part
pub struct Part {
pub name: &'static str,
pub summary: &'static str,
pub props: &'static [Prop],
pub events: &'static [(&'static str, &'static str)],
pub children: bool,
}One component of a family (CardTitle in the Card family).
Fields
events
pub events: &'static [(&'static str, &'static str)](event, when it fires) — component events; DOM events such as click are forwarded to the part's element too.
Methods
prop
pub fn prop(&self, name: &str) -> Option<&'static Prop>A prop it documents or shares with others like it (not counting COMMON ones).
shared_props
pub fn shared_props(&self) -> impl Iterator<Item = &'static Prop> + use<>The shared props it takes beyond its own.
all_events
pub fn all_events(&self) -> impl Iterator<Item = &'static (&'static str, &'static str)> + use<>Its own events and the ones it shares with others like it.
accepts
pub fn accepts(&self, name: &str) -> boolWhether name is accepted: documented, common, or a plain attribute that's forwarded.