Skip to main content

Component

Trait Component 

Source
pub trait Component:
    Send
    + Sync
    + 'static { }
Expand description

Marker trait for component types stored in the ECS.

Components must be Send + Sync + 'static so they can be accessed from the game loop thread and (in the future) from parallel system threads via rayon.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§