pub struct EntityId(/* private fields */);Expand description
Entity handle.
Implementations§
Source§impl EntityId
impl EntityId
Sourcepub fn index(self) -> u64
pub fn index(self) -> u64
Returns the index part of the EntityId.
⚠️ You shouldn’t use it to index a storage.
Sourcepub fn uindex(self) -> usize
pub fn uindex(self) -> usize
Returns the index part of the EntityId as an usize.
⚠️ You shouldn’t use it to index a storage.
Sourcepub const fn new_from_index_and_gen(index: u64, gen: u16) -> Self
pub const fn new_from_index_and_gen(index: u64, gen: u16) -> Self
Build a new EntityId with the given index and generation.
Sourcepub fn from_inner(inner: u64) -> Option<EntityId>
pub fn from_inner(inner: u64) -> Option<EntityId>
Build an EntityId from its inner representation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityId
Available on crate feature serde1 only.
impl<'de> Deserialize<'de> for EntityId
Available on crate feature
serde1 only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for EntityId
impl Ord for EntityId
Source§impl PartialOrd for EntityId
impl PartialOrd for EntityId
impl Copy for EntityId
impl Eq for EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnwindSafe for EntityId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more