Skip to main content

GpuiComponentShape

Trait GpuiComponentShape 

Source
pub trait GpuiComponentShape: ComponentShapeMetadata {
    type State: 'static;
    type RenderComponent: GpuiComponentRender<Self::State>;

    // Required method
    fn new(
        window: &mut Window,
        cx: &mut Context<'_, Self::State>,
    ) -> Self::State;
}
Expand description

Shape contract for GPUI components.

Required Associated Types§

Source

type State: 'static

Backing GPUI component state type.

Source

type RenderComponent: GpuiComponentRender<Self::State>

Shape-owned render component contract for prototyping output.

Required Methods§

Source

fn new(window: &mut Window, cx: &mut Context<'_, Self::State>) -> Self::State

Build the component state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§