[][src]Struct syntax_pos::symbol::Symbol

pub struct Symbol(_);

A symbol is an interned or gensymed string. The use of newtype_index! means that Option only takes up 4 bytes, because newtype_index! reserves the last 256 values for tagging purposes.

Note that Symbol cannot be a newtype_index! directly because it implements fmt::Debug, Encodable, and Decodable in special ways.

Methods

impl Symbol
[src]

Maps a string to its interned representation.

Gensyms a new usize, using the current interner.

Trait Implementations

impl Ord for Symbol
[src]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialEq<Symbol> for Symbol
[src]

impl<T: Deref<Target = str>> PartialEq<T> for Symbol
[src]

This method tests for !=.

impl !Send for Symbol
[src]

impl Clone for Symbol
[src]

Performs copy-assignment from source. Read more

impl Copy for Symbol
[src]

impl Eq for Symbol
[src]

impl PartialOrd<Symbol> for Symbol
[src]

impl !Sync for Symbol
[src]

impl Display for Symbol
[src]

impl Debug for Symbol
[src]

impl Hash for Symbol
[src]

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

impl Encodable for Symbol
[src]

impl Decodable for Symbol
[src]

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<E> SpecializationError for E
[src]

impl<T> Erased for T
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T