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

Give the internal value of this index, even if it’s invalid.

Check if the index is valid and not equal to TableIndex::INVALID

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.