pub trait GpuiComponentShapeBuilder<Shape>where
Shape: GpuiComponentShape,{
// Required method
fn build(
self,
window: &mut Window,
cx: &mut Context<'_, <Shape as GpuiComponentShape>::State>,
) -> <Shape as GpuiComponentShape>::State;
}Expand description
Configured builder for a GPUI component shape.
Generated code can use this contract when a field selects a component shape
with a configuration expression, such as Select::<_>.searchable(true).
The configured value decides how to initialize the same shape state that the
plain GpuiComponentShape::new path would otherwise construct.
Required Methods§
Sourcefn build(
self,
window: &mut Window,
cx: &mut Context<'_, <Shape as GpuiComponentShape>::State>,
) -> <Shape as GpuiComponentShape>::State
fn build( self, window: &mut Window, cx: &mut Context<'_, <Shape as GpuiComponentShape>::State>, ) -> <Shape as GpuiComponentShape>::State
Build the configured component state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".