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,
) -> ComponentShapeUse
pub const fn new( field_name: ComponentFieldName<'static>, shape_path: RustPath, ) -> ComponentShapeUse
Records that field_name uses the component shape at shape_path.
Sourcepub const fn for_field(
field_name: &'static str,
shape_path: RustPath,
) -> ComponentShapeUse
pub const fn for_field( field_name: &'static str, shape_path: RustPath, ) -> ComponentShapeUse
Records that a source field uses the component shape at shape_path.
Sourcepub const fn with_field_type(self, field_type: RustType) -> ComponentShapeUse
pub const fn with_field_type(self, field_type: RustType) -> ComponentShapeUse
Adds Rust type metadata for the source field.
Sourcepub const fn with_capabilities(
self,
capabilities: ComponentCapabilities,
) -> ComponentShapeUse
pub const fn with_capabilities( self, capabilities: ComponentCapabilities, ) -> ComponentShapeUse
Replaces the shape capability metadata.
Sourcepub const fn with_prototyping(
self,
prototyping: ComponentPrototyping,
) -> ComponentShapeUse
pub const fn with_prototyping( self, prototyping: ComponentPrototyping, ) -> ComponentShapeUse
Replaces the shape prototyping metadata.
Sourcepub const fn with_mcp_input(self, mcp_input: McpInput) -> ComponentShapeUse
pub const fn with_mcp_input(self, mcp_input: McpInput) -> ComponentShapeUse
Replaces the shape’s model-controlled MCP input metadata.
Sourcepub const fn with_shape_metadata<Shape>(self) -> ComponentShapeUsewhere
Shape: ComponentShapeMetadata,
pub const fn with_shape_metadata<Shape>(self) -> ComponentShapeUsewhere
Shape: ComponentShapeMetadata,
Copies type-owned shape metadata from a concrete component shape.
Sourcepub const fn with_value_mcp_input<Shape, Value>(self) -> ComponentShapeUsewhere
Shape: ComponentShapeFor<Value>,
pub const fn with_value_mcp_input<Shape, Value>(self) -> ComponentShapeUsewhere
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