Skip to main content

ComponentEntry

Struct ComponentEntry 

Source
pub struct ComponentEntry {
    pub class: &'static str,
    pub kind: &'static str,
    pub parent: &'static str,
    pub data_attrs: &'static [DataAttr],
    pub example_html: &'static str,
    pub example_markdown: &'static str,
    pub status: Status,
    pub since: &'static str,
    pub description: &'static str,
}
Expand description

A single component contract entry.

Fields§

§class: &'static str

Class name without leading . (e.g. "moss-cards").

§kind: &'static str

Container / Instance / Standalone / Chrome.

§parent: &'static str

For Instance kinds, the parent container’s class (or "").

§data_attrs: &'static [DataAttr]

Declared data-* attributes on the element with this class.

§example_html: &'static str

Example HTML snippet showing the class in context. Multi-line allowed.

§example_markdown: &'static str

Example markdown that produces this HTML. Empty for HTML-only chrome.

§status: Status

Status: confirmed / emerging / retired.

§since: &'static str

Contract version this entry was introduced in.

§description: &'static str

Optional human-readable description.

Implementations§

Source§

impl ComponentEntry

Source

pub fn is_public(&self) -> bool

True for entries that belong in the public, agent/theme-facing surface. v1 rule: not retired AND not an internal implementation class.

Internal classes (e.g. all moss-apply*) stay in COMPONENTS so the sync-test can validate them, but they must not surface in moss describe or docs/reference/contract.md — they are subject to change at any time.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.