#[derive(Storage)]Expand description
Prepares a struct for use as the type parameter of a World.
This custom derive implements RemoveAll, as well as AsRef and AsMut for each field.
The struct’s fields must by of type ComponentVec.
§Note
If this custom derive cannot be used, e.g. because the feature proc is not enabled, the macro
derive_storage can be used instead.
§Examples
use checs::{ComponentVec, Storage};
#[derive(Default, Storage)]
struct Storage {
ints: ComponentVec<i32>,
floats: ComponentVec<f32>,
}The above will expand to something similar to this:
::checs::internal_derive_storage!{
#[derive(Default)]
struct Storage {
ints: ComponentVec<i32>,
floats: ComponentVec<f32>,
}
}