pub struct ObjectId(/* private fields */);
Expand description
A unique identifier for an object within a pool.
ObjectId
is an opaque wrapper around a numeric identifier.
IDs are guaranteed to be unique and monotonically increasing
within a single pool. Each new object receives an identifier
greater than the previously created object, but IDs are not
guaranteed to be consecutive (gaps may exist).
This type is intended to be used as an opaque handle for
identifying objects. It implements common traits such as
Copy
, Clone
, Eq
, Ord
, and Hash
so that
it can be compared, ordered, or stored in sets and maps.
It should not be used for arithmetic or treated as a raw number.
Trait Implementations§
Source§impl Ord for ObjectId
impl Ord for ObjectId
Source§impl PartialOrd for ObjectId
impl PartialOrd for ObjectId
impl Copy for ObjectId
impl Eq for ObjectId
impl StructuralPartialEq for ObjectId
Auto Trait Implementations§
impl Freeze for ObjectId
impl RefUnwindSafe for ObjectId
impl Send for ObjectId
impl Sync for ObjectId
impl Unpin for ObjectId
impl UnwindSafe for ObjectId
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