[][src]Trait components_arena::ComponentId

pub trait ComponentId: Debug + Copy + Eq + Ord + Hash {
    fn from_raw_parts(raw_parts: (usize, NonZeroUsize)) -> Self;
fn into_raw_parts(self) -> (usize, NonZeroUsize); }

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

Required methods

fn from_raw_parts(raw_parts: (usize, NonZeroUsize)) -> Self

Forms an id from the into_raw_parts function result.

fn into_raw_parts(self) -> (usize, NonZeroUsize)

Transforms the id to primitive-typed parts, which can be easily passed through FFI.

Use from_raw_parts to put the the id back together.

Loading content...

Implementors

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

Loading content...