pub struct Component {
pub id: String,
pub component: String,
pub props: Map<String, Value>,
}Expand description
One node of the flat component adjacency list.
id and component are the only fixed fields; everything else is
catalog-defined and lives in Component::props as raw JSON. The struct
flattens back to the wire shape {"id": ..., "component": "Text", "text": ...}.
Fields§
§id: StringUnique id within the surface; other components reference it by this.
component: StringComponent type name, resolved against the surface’s catalog.
props: Map<String, Value>Catalog-defined properties, verbatim.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
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
impl StructuralPartialEq for Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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