Struct idmap::table::TableIndex [−][src]
pub struct TableIndex(_);
Expand description
The index of an entry in either IdTable
or EntryTable
.
The marker index TableIndex::INVALID
is used to indicate missing entries.
Implementations
The special marker index for a missing/invalid entry, which may be used by a table to indicate that an entry is missing.
This is used instead of an Option
for performance reasons,
as it can often be internally folded into a bounds check
which would otherwise need a seperate check.
Create a table index corresponding to the specified key
Create a table index from the specified value
Give the underlying value of this index, or None
if it’s invalid.
Unwrap the underlying value of this index, without checking validity in release builds.
This is completely safe to make this a debug-check since it’s already going to be bounds checked.
Add the specified value to this index, panicking on overflow
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TableIndex
impl Send for TableIndex
impl Sync for TableIndex
impl Unpin for TableIndex
impl UnwindSafe for TableIndex
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.