pub struct ComponentShapeUse { /* private fields */ }Expand description
Framework-neutral metadata describing a field’s component shape use.
This records that a source field is associated with a component shape path, along with optional field type metadata and shape-owned capability or prototyping metadata. It is metadata only: runtime construction contracts, framework-specific render behavior, and storage semantics belong in the backend-specific crates that consume it.
Implementations§
Source§impl ComponentShapeUse
impl ComponentShapeUse
Sourcepub const fn new(
field_name: ComponentFieldName<'static>,
shape_path: RustPath,
) -> Self
pub const fn new( field_name: ComponentFieldName<'static>, shape_path: RustPath, ) -> Self
Records that field_name uses the component shape at shape_path.
Sourcepub const fn for_field(field_name: &'static str, shape_path: RustPath) -> Self
pub const fn for_field(field_name: &'static str, shape_path: RustPath) -> Self
Records that a source field uses the component shape at shape_path.
Sourcepub const fn with_field_type(self, field_type: RustType) -> Self
pub const fn with_field_type(self, field_type: RustType) -> Self
Adds Rust type metadata for the source field.
Sourcepub const fn with_capabilities(
self,
capabilities: ComponentCapabilities,
) -> Self
pub const fn with_capabilities( self, capabilities: ComponentCapabilities, ) -> Self
Replaces the shape capability metadata.
Sourcepub const fn with_prototyping(self, prototyping: ComponentPrototyping) -> Self
pub const fn with_prototyping(self, prototyping: ComponentPrototyping) -> Self
Replaces the shape prototyping metadata.
Sourcepub const fn with_mcp_input(self, mcp_input: McpInput) -> Self
pub const fn with_mcp_input(self, mcp_input: McpInput) -> Self
Replaces the shape’s model-controlled MCP input metadata.
Sourcepub const fn with_shape_metadata<Shape>(self) -> Selfwhere
Shape: ComponentShapeMetadata,
pub const fn with_shape_metadata<Shape>(self) -> Selfwhere
Shape: ComponentShapeMetadata,
Copies type-owned shape metadata from a concrete component shape.
Sourcepub const fn with_value_mcp_input<Shape, Value>(self) -> Selfwhere
Shape: ComponentShapeFor<Value>,
pub const fn with_value_mcp_input<Shape, Value>(self) -> Selfwhere
Shape: ComponentShapeFor<Value>,
Copies value-specific MCP input metadata from a component shape/value pair.
Sourcepub const fn field_name(self) -> ComponentFieldName<'static>
pub const fn field_name(self) -> ComponentFieldName<'static>
Source field name.
Sourcepub const fn field_type(self) -> Option<RustType>
pub const fn field_type(self) -> Option<RustType>
Optional Rust type metadata for the source field.
Sourcepub const fn shape_path(self) -> RustPath
pub const fn shape_path(self) -> RustPath
Component shape path used by the source field.
Sourcepub const fn capabilities(self) -> ComponentCapabilities
pub const fn capabilities(self) -> ComponentCapabilities
Shape capability metadata.
Sourcepub const fn prototyping(self) -> ComponentPrototyping
pub const fn prototyping(self) -> ComponentPrototyping
Shape prototyping metadata.
Trait Implementations§
Source§impl Clone for ComponentShapeUse
impl Clone for ComponentShapeUse
Source§fn clone(&self) -> ComponentShapeUse
fn clone(&self) -> ComponentShapeUse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more