[][src]Struct moore::name::NameTable

pub struct NameTable { /* fields omitted */ }

A lookup table of names. Internalizes strings either in a case sensitive or case insensitive way. Allows for bidirectional lookup, i.e. by string or by assigned name.

Implementations

impl NameTable[src]

pub fn new() -> NameTable[src]

Create a new empty name table.

pub fn intern(&self, value: &str, case_sensitive: bool) -> Name[src]

Obtain a name for a string. This either inserts the string into the table and returns the new name, or returns the existing name if the string already exists in the table.

pub fn get(&self, idx: Name) -> RcStr[src]

Retrieve the string given a name tag.

pub fn find<Q>(&self, value: &Q) -> Option<Name> where
    Q: Eq + Hash + ?Sized,
    RcStr: Borrow<Q>, 
[src]

Try to find a string.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.