Struct obj_pool::ObjId [−][src]
pub struct ObjId(_);
An id of the object in an ObjPool
.
In release it is basically just an index in the underlying vector, but in debug it's an index
+
ObjPool
-specific offset
. This is made to be able to check ObjId
if it's from the same
ObjPool
we are trying to get an object from.
Methods
impl ObjId
[src]
impl ObjId
pub fn into_index(self, offset: u32) -> u32
[src]
pub fn into_index(self, offset: u32) -> u32
pub fn from_index(index: u32, offset: u32) -> ObjId
[src]
pub fn from_index(index: u32, offset: u32) -> ObjId
Methods from Deref<Target = u32>
Trait Implementations
impl Copy for ObjId
[src]
impl Copy for ObjId
impl Clone for ObjId
[src]
impl Clone for ObjId
fn clone(&self) -> ObjId
[src]
fn clone(&self) -> ObjId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ObjId
[src]
impl PartialEq for ObjId
fn eq(&self, other: &ObjId) -> bool
[src]
fn eq(&self, other: &ObjId) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ObjId) -> bool
[src]
fn ne(&self, other: &ObjId) -> bool
This method tests for !=
.
impl Eq for ObjId
[src]
impl Eq for ObjId
impl Hash for ObjId
[src]
impl Hash for ObjId
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for ObjId
[src]
impl Debug for ObjId
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for ObjId
[src]
impl Display for ObjId
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl FromStr for ObjId
[src]
impl FromStr for ObjId
type Err = ParseIntError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Deref for ObjId
[src]
impl Deref for ObjId
type Target = u32
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl From<u32> for ObjId
[src]
impl From<u32> for ObjId
impl InvalidValue<ObjId> for ObjId
[src]
impl InvalidValue<ObjId> for ObjId
fn invalid_value() -> ObjId
[src]
fn invalid_value() -> ObjId
impl<T> Index<ObjId> for ObjPool<T>
[src]
impl<T> Index<ObjId> for ObjPool<T>
type Output = T
The returned type after indexing.
fn index(&self, obj_id: ObjId) -> &T
[src]
fn index(&self, obj_id: ObjId) -> &T
Performs the indexing (container[index]
) operation.
impl<T> IndexMut<ObjId> for ObjPool<T>
[src]
impl<T> IndexMut<ObjId> for ObjPool<T>