Struct shipyard::EntityId [−][src]
Handle to an entity.
Implementations
impl EntityId
[src]
pub fn from_index_and_gen(index: u64, gen: u32) -> EntityId
[src]
This is supported on crate feature
serde1
only.Make an EntityId
from an index and generation.
impl EntityId
[src]
pub fn index(self) -> u64
[src]
Returns the index part of the EntityId
.
⚠️ You shouldn’t use it to index a storage.
pub fn uindex(self) -> usize
[src]
Returns the index part of the EntityId
as an usize.
⚠️ You shouldn’t use it to index a storage.
pub fn gen(self) -> u64
[src]
Returns the generation part of the EntityId
.
pub fn dead() -> Self
[src]
Returns a dead EntityId
, it can be used as a null entity.
pub fn inner(self) -> u64
[src]
Returns EntityId
’s inner representation.
pub fn from_inner(inner: u64) -> Option<EntityId>
[src]
Build an EntityId
from its inner representation.
Trait Implementations
impl Clone for EntityId
[src]
impl Copy for EntityId
[src]
impl Debug for EntityId
[src]
impl<'de> Deserialize<'de> for EntityId
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for EntityId
[src]
impl Hash for EntityId
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Index<EntityId> for SparseSet<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, entity: EntityId) -> &Self::Output
[src]
impl<T> IndexMut<EntityId> for SparseSet<T>
[src]
impl Ord for EntityId
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<EntityId> for EntityId
[src]
impl PartialOrd<EntityId> for EntityId
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for EntityId
[src]
impl StructuralEq for EntityId
[src]
Auto Trait Implementations
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnwindSafe for EntityId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,