Skip to main content

ProbarComponent

Trait ProbarComponent 

Source
pub trait ProbarComponent:
    Sized
    + Copy
    + 'static {
    // Required methods
    fn component_id() -> ComponentId;
    fn layout() -> Layout;
}
Expand description

Trait for type-safe component access (Poka-Yoke pattern)

This trait is implemented by #[derive(ProbarComponents)] macro.

Required Methods§

Source

fn component_id() -> ComponentId

Get the component type ID

Source

fn layout() -> Layout

Get the memory layout

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§