Skip to main content

Module shape

Module shape 

Source
Expand description

Runtime traits and helper types for component shapes. Runtime storage policy used by #[derive(GpuiForm)].

Component shape construction, rendering, supported value types, and value binding are provided by component-shape and component-shape-gpui.

Structs§

ComponentCapabilities
Shape-owned capability flags consumed by generators and integrations.
ComponentPrototyping
Shape-owned metadata for prototyping generators.
ComponentSuffix
Preferred generated component helper suffix.
DefaultGpuiComponentShapeBuilder
Default builder for a shape’s normal GpuiComponentShape::new behavior.
DirectValueStorage
Store non-optional source fields directly as T.
McpInput
Shape-owned metadata for model-controlled MCP input.
NoGpuiRenderComponent
Marker render contract for shapes that do not publish render metadata.
RequiredValueStorage
Store non-optional source fields as Option<T> and treat None as missing.

Enums§

McpInputShape
Framework-neutral shape of structured MCP input accepted by a component.
McpPrimitiveKind
Primitive value kinds a component shape can expose to model-controlled tools.
McpRangeBoundKind
Primitive kinds that can be used as { "min": ..., "max": ... } MCP range bounds.
RenderCapability
Whether a component shape publishes render-component metadata.
ValueBindingCapability
Whether a component shape publishes value-binding metadata.
ValueChange
Normalized value change derived from a component event.

Traits§

ComponentShapeFor
Marker that a component shape supports a value or field type.
ComponentShapeMetadata
Framework-neutral metadata published by a component shape.
ComponentValueStoragePolicy
Marker trait for a component shape’s generated value-holder storage policy.
DeclaredGpuiComponentShape
Marker for component shapes declared through component-shape GPUI macros.
DefaultValueStorage
Storage policies that can synthesize missing/default value-holder storage.
GpuiComponentRender
Renders a component UI value from a component state entity.
GpuiComponentShape
Shape contract for GPUI components.
GpuiComponentShapeBuilder
Configured builder for a GPUI component shape.
GpuiComponentShapeFor
Marker that a GPUI component shape supports a value type.
GpuiComponentStateValueBinding
Value-binding contract implemented by backing component state.
GpuiComponentValueBinding
Optional value-binding contract for GPUI component shapes.
GpuiFormComponentShapePolicy
Form storage policy for a GPUI component shape.
InfallibleValueStorage
Storage policies whose holder-to-model conversion cannot fail because the storage representation always contains a value.
ValueStorage
Storage behavior used by generated form value holders.

Functions§

build_component_shape
Build component state from a configured shape builder.
is_valid_component_field_suffix
Returns whether a component/prototyping suffix is valid.
seed_value_binding_state
Seed component state from the current value without spelling out the associated-type projection at every generated call site.
value_change
Convert a component event into a value change without repeating UFCS projections in generated code.

Type Aliases§

GpuiComponentEventOf
Event type for a value-bound GPUI component shape and value.
GpuiComponentStateOf
State type for a GPUI component shape.

Derive Macros§

GpuiComponentShape
Derive macro for GPUI component shape metadata.