[][src]Crate nitric_component

nitric-component

This crate implements component storages, providing a mapping from IDs / Entities to data points.

Traits

Split traits

Often you might expect more methods in traits like Storage. However, many properties of storages, allocators and IDs are optional and not implemented for all instances. That means all code will only depend on the traits it actually uses and is therefore reusable in many situations.

Traits are always grouped together in modules so you have an overview of the methods you can use.

Structure

This crate is split into a generic interface and implementations of these interfaces.

Generic interfaces are in

  • allocator
  • bit_set
  • id
  • storage

Implementations are in

  • impls

Additionally, error types can be found in error. Utility types can be found in util. A prelude for common traits & types can be imported using use nitric_component::prelude::*.

Modules

allocator

Module for defining the allocator interface and its traits.

bit_set

Module defining the BitSet trait.

error

Error types

id

Provides a generic ID interface.

impls

Implementations of the generic interfaces provided by this crate.

prelude
storage

Provides a generic interface for storages.

util

Utility types