pub struct ObjId(pub NonZeroU32);Expand description
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.
Tuple Fields§
§0: NonZeroU32Implementations§
Source§impl ObjId
impl ObjId
pub fn from_index(index: u32) -> Self
pub const fn into_index(self) -> u32
Trait Implementations§
Source§impl From<NonZero<u32>> for ObjId
impl From<NonZero<u32>> for ObjId
Source§fn from(v: NonZeroU32) -> ObjId
fn from(v: NonZeroU32) -> ObjId
Converts to this type from the input type.
impl Copy for ObjId
impl Eq for ObjId
impl StructuralPartialEq for ObjId
Auto Trait Implementations§
impl Freeze for ObjId
impl RefUnwindSafe for ObjId
impl Send for ObjId
impl Sync for ObjId
impl Unpin for ObjId
impl UnwindSafe for ObjId
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