[−][src]Struct moore::name::NameTable
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]
Q: Eq + Hash + ?Sized,
RcStr: Borrow<Q>,
Try to find a string.
Auto Trait Implementations
impl !RefUnwindSafe for NameTable
[src]
impl !Send for NameTable
[src]
impl !Sync for NameTable
[src]
impl Unpin for NameTable
[src]
impl UnwindSafe for NameTable
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,