Struct symbol_map::Symbol
[−]
[src]
pub struct Symbol<T, D> where D: SymbolId {
// some 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]
fn id(&self) -> &D
Returns the symbol's ID.
fn data(&self) -> &T
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, D> Hash for Symbol<T, D> where T: Hash, D: SymbolId[src]
fn hash<H>(&self, state: &mut H) where H: Hasher
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl<T, D> PartialEq for Symbol<T, D> where T: PartialEq, D: SymbolId[src]
fn eq(&self, other: &Self) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
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]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more