[][src]Trait components_arena::ComponentId

pub trait ComponentId: Debug + Copy + Eq + Ord + Hash {
    fn from_raw(raw: RawId) -> Self;
fn into_raw(self) -> RawId; }

An implementer of the ComponentId trait is a type behaves as Id.

Required methods

fn from_raw(raw: RawId) -> Self

Forms an id from the into_raw function result.

fn into_raw(self) -> RawId

Transforms the id to primitive-typed parts, which can be easily passed through FFI and stored in non-generic context.

Use from_raw to get the source id back.

Loading content...

Implementations on Foreign Types

impl ComponentId for ()[src]

impl ComponentId for usize[src]

Loading content...

Implementors

impl ComponentId for RawId[src]

impl<C: Component> ComponentId for Id<C>[src]

Loading content...