Struct idmap::table::TableIndex [] [src]

pub struct TableIndex(_);

The index of an entry in either IdTable or EntryTable.

The marker index TableIndex::INVALID is used to indicate missing entries.

Methods

impl TableIndex
[src]

INVALID: TableIndex = TableIndex(<u32>::max_value())

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.

[src]

[src]

[src]

Give the underlying value of this index, or None if it's invalid.

[src]

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.

[src]

[src]

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

[src]

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

Trait Implementations

impl Copy for TableIndex
[src]

impl Clone for TableIndex
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd for TableIndex
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

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

[src]

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

[src]

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

impl PartialEq for TableIndex
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for TableIndex
[src]

impl Ord for TableIndex
[src]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for TableIndex
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for TableIndex

impl Sync for TableIndex