Struct shard_ecs::descriptors::archetype_id::ArchetypeId
source · #[repr(transparent)]pub struct ArchetypeId(_);
Expand description
Represents the unique subset of components as a comparable identifier.
See [ArchetypeDescriptor::compute_archetype_id
] for computing an instance of it.
The invalid archetype id is defined to be 0.
Implementations
sourceimpl ArchetypeId
impl ArchetypeId
sourcepub const INVALID: ArchetypeId = _
pub const INVALID: ArchetypeId = _
The invalid archetype id, defined to be zero. Any archetype with this id must not be used as valid archetype.
sourceimpl ArchetypeId
impl ArchetypeId
sourcepub const fn to_ne_bytes(self) -> [u8; 4]
pub const fn to_ne_bytes(self) -> [u8; 4]
Copies the value into an array of ne_bytes. (See u32::to_ne_bytes
).
Trait Implementations
sourceimpl Clone for ArchetypeId
impl Clone for ArchetypeId
sourcefn clone(&self) -> ArchetypeId
fn clone(&self) -> ArchetypeId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ArchetypeId
impl Debug for ArchetypeId
sourceimpl From<ComponentTypeId> for ArchetypeId
impl From<ComponentTypeId> for ArchetypeId
sourcefn from(value: ComponentTypeId) -> Self
fn from(value: ComponentTypeId) -> Self
Converts to this type from the input type.
sourceimpl From<u32> for ArchetypeId
impl From<u32> for ArchetypeId
sourceimpl Hash for ArchetypeId
impl Hash for ArchetypeId
sourceimpl Ord for ArchetypeId
impl Ord for ArchetypeId
sourcefn cmp(&self, other: &ArchetypeId) -> Ordering
fn cmp(&self, other: &ArchetypeId) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ArchetypeId> for ArchetypeId
impl PartialEq<ArchetypeId> for ArchetypeId
sourcefn eq(&self, other: &ArchetypeId) -> bool
fn eq(&self, other: &ArchetypeId) -> bool
sourceimpl PartialOrd<ArchetypeId> for ArchetypeId
impl PartialOrd<ArchetypeId> for ArchetypeId
sourcefn partial_cmp(&self, other: &ArchetypeId) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchetypeId) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ArchetypeId
impl Eq for ArchetypeId
impl StructuralEq for ArchetypeId
impl StructuralPartialEq for ArchetypeId
Auto Trait Implementations
impl RefUnwindSafe for ArchetypeId
impl Send for ArchetypeId
impl Sync for ArchetypeId
impl Unpin for ArchetypeId
impl UnwindSafe for ArchetypeId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more