Skip to main content

EntityId

Trait EntityId 

Source
pub trait EntityId:
    Debug
    + Copy
    + Clone
    + Send
    + Sync
    + Eq
    + PartialEq
    + Ord
    + PartialOrd
    + Hash {
    // Required methods
    fn from_idx(idx: usize) -> Self;
    fn to_idx(self) -> usize;
}
Expand description

Implemented by types that can be used as IDs in prjcombine_entity datastructures.

For new code, you use one of EntityIdU8, EntityIdU16, or EntityIdU32, as appropriate.

Required Methods§

Source

fn from_idx(idx: usize) -> Self

Source

fn to_idx(self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§