pub struct Idx<T> { /* private fields */ }Expand description
Stable index into an Arena or
SharedArena.
Obtained from Arena::alloc or
SharedArena::alloc. Implements Copy,
so it can be freely duplicated and stored in data structures.
Valid as long as the arena has not been reset or rolled back past this index.
§Panics
Indexing with a stale Idx (after rollback/reset) panics with
an out-of-bounds error.
Implementations§
Trait Implementations§
Source§impl<T> Ord for Idx<T>
impl<T> Ord for Idx<T>
Source§impl<T> PartialOrd for Idx<T>
impl<T> PartialOrd for Idx<T>
impl<T> Copy for Idx<T>
impl<T> Eq for Idx<T>
Auto Trait Implementations§
impl<T> Freeze for Idx<T>
impl<T> RefUnwindSafe for Idx<T>where
T: RefUnwindSafe,
impl<T> Send for Idx<T>where
T: Send,
impl<T> Sync for Idx<T>where
T: Sync,
impl<T> Unpin for Idx<T>where
T: Unpin,
impl<T> UnsafeUnpin for Idx<T>
impl<T> UnwindSafe for Idx<T>where
T: UnwindSafe,
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