pub struct ComponentSpec {
pub name: String,
pub description: String,
pub props_schema: Value,
pub is_plugin: bool,
pub slot_fields: Vec<String>,
}Expand description
Metadata and JSON Schema for a single JSON-UI component.
Built by Catalog::build from the static BUILTIN_SPECS table (built-ins)
or from crate::plugin::JsonUiPlugin::props_schema (plugins).
Fields§
§name: StringComponent type name as it appears in the Spec’s "type" field.
description: StringShort imperative description used in prompt output and catalog tooling.
props_schema: ValueJSON Schema object for the component’s Props struct (schemars output).
is_plugin: booltrue for plugin components; false for built-ins.
slot_fields: Vec<String>Names of fields whose values are Vec<String> of element IDs (slot fields).
Examples: ["footer"] for Card, ["children"] for Tabs’ per-tab model,
[] for leaf components with no children slots.
Auto Trait Implementations§
impl Freeze for ComponentSpec
impl RefUnwindSafe for ComponentSpec
impl Send for ComponentSpec
impl Sync for ComponentSpec
impl Unpin for ComponentSpec
impl UnsafeUnpin for ComponentSpec
impl UnwindSafe for ComponentSpec
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