#[non_exhaustive]pub struct Component {
pub id: String,
pub component: String,
pub catalog_id: Option<String>,
pub accessibility: Option<Value>,
pub metadata: Option<Value>,
pub checks: Option<Vec<CheckRule>>,
pub properties: Map<String, Value>,
}Expand description
One component on a surface. id and component are the protocol’s; the
@-prefixed fields are its envelope mixins; everything else is the
catalog’s, kept as JSON in Component::properties.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique on its surface; a UAX #31 identifier.
component: StringThe component type, from the catalog.
catalog_id: Option<String>The catalog to resolve the type in, overriding the surface’s default.
accessibility: Option<Value>label, description, live, and hidden, for assistive technologies.
metadata: Option<Value>Vendor metadata (extensions).
checks: Option<Vec<CheckRule>>Renderer-side checks, on checkable components.
properties: Map<String, Value>The catalog’s properties for this type (text, children, action, …).
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 Forget for Component
impl Freeze for Componentwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<CheckRule>: Freeze,
impl Move for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Componentwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<CheckRule>: UnsafeUnpin,
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