Struct ncollide2d::utils::GenerationalId
source · pub struct GenerationalId {
pub id: usize,
/* private fields */
}
Expand description
A unique idetifier given by a usize id and a generation number.
Fields§
§id: usize
The identifier.
Implementations§
source§impl GenerationalId
impl GenerationalId
sourcepub fn invalid() -> Self
pub fn invalid() -> Self
An identifier that cannot be constructed by IdAlloc
and that is not equal to any other identifier.
sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Checks if this identifier is invalid.
Trait Implementations§
source§impl Clone for GenerationalId
impl Clone for GenerationalId
source§fn clone(&self) -> GenerationalId
fn clone(&self) -> GenerationalId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GenerationalId
impl Debug for GenerationalId
source§impl Hash for GenerationalId
impl Hash for GenerationalId
source§impl PartialEq<GenerationalId> for GenerationalId
impl PartialEq<GenerationalId> for GenerationalId
source§fn eq(&self, other: &GenerationalId) -> bool
fn eq(&self, other: &GenerationalId) -> bool
impl Copy for GenerationalId
impl Eq for GenerationalId
impl StructuralEq for GenerationalId
impl StructuralPartialEq for GenerationalId
Auto Trait Implementations§
impl RefUnwindSafe for GenerationalId
impl Send for GenerationalId
impl Sync for GenerationalId
impl Unpin for GenerationalId
impl UnwindSafe for GenerationalId
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.