pub struct Idx<T> {
pub raw: u32,
/* private fields */
}Expand description
A typed index into an arena.
The phantom type prevents mixing indices from different arenas.
Fields§
§raw: u32Implementations§
Source§impl<T> Idx<T>
impl<T> Idx<T>
Sourcepub const NOT_STARTED: Self
pub const NOT_STARTED: Self
Sentinel: slot not started (reserved, slot 0)
Sourcepub const fn not_started() -> Self
pub const fn not_started() -> Self
Sentinel: slot not started (reserved, slot 0)
pub fn is_not_started(self) -> bool
pub fn is_complete(self) -> bool
pub fn is_valid(self) -> bool
pub fn same(self, other: Self) -> bool
Trait Implementations§
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>
impl<T> Send for Idx<T>
impl<T> Sync for Idx<T>
impl<T> Unpin for Idx<T>
impl<T> UnsafeUnpin for Idx<T>
impl<T> UnwindSafe for Idx<T>
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