Struct symbol_map::Symbol [] [src]

pub struct Symbol<T, D> where
    D: SymbolId
{ /* fields omitted */ }

A table entry that associates an instance of T with an atomic symbol.

Types T should not be mutated by any means once they are associated with a SymbolId and stored in a Table. Doing so may invalidate any caching or indexing that is done on top of the table.

Methods

impl<T, D> Symbol<T, D> where
    D: SymbolId
[src]

Returns the symbol's ID.

Returns a reference to the symbol's data.

A Symbol<T> that is owned by a Table does not move in memory as long as it is not dropped from the table. As a result, you may retain a raw pointer to this data and dereference it as long as its parent Symbol<T> is not dropped.

Trait Implementations

impl<T: Debug, D: Debug> Debug for Symbol<T, D> where
    D: SymbolId
[src]

Formats the value using the given formatter.

impl<T, D> Hash for Symbol<T, D> where
    T: Hash,
    D: SymbolId
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T, D> PartialEq for Symbol<T, D> where
    T: PartialEq,
    D: SymbolId
[src]

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

This method tests for !=.

impl<T, D> Eq for Symbol<T, D> where
    T: Eq,
    D: SymbolId
[src]

impl<T, D> PartialOrd for Symbol<T, D> where
    T: PartialOrd,
    D: SymbolId
[src]

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

impl<T, D> Ord for Symbol<T, D> where
    T: Ord,
    D: SymbolId
[src]

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