Trait lasso::Reader

source ·
pub trait Reader<K = Spur>: Resolver<K> {
    // Required methods
    fn get(&self, val: &str) -> Option<K>;
    fn contains(&self, val: &str) -> bool;
}
Expand description

A generic interface that allows using any underlying interner for both its reading and resolution capabilities, allowing both str -> key and key -> str lookups

Required Methods§

source

fn get(&self, val: &str) -> Option<K>

Get a key for the given string value if it exists

source

fn contains(&self, val: &str) -> bool

Returns true if the current interner contains the given string

Implementations on Foreign Types§

source§

impl<K, I> Reader<K> for Box<I>where K: Key, I: Reader<K> + ?Sized + 'static,

source§

fn get(&self, val: &str) -> Option<K>

source§

fn contains(&self, val: &str) -> bool

source§

impl<T, K> Reader<K> for &mut Twhere T: Reader<K>,

source§

fn get(&self, val: &str) -> Option<K>

source§

fn contains(&self, val: &str) -> bool

source§

impl<T, K> Reader<K> for &Twhere T: Reader<K>,

source§

fn get(&self, val: &str) -> Option<K>

source§

fn contains(&self, val: &str) -> bool

Implementors§

source§

impl<K, S> Reader<K> for Rodeo<K, S>where K: Key, S: BuildHasher,

source§

impl<K, S> Reader<K> for RodeoReader<K, S>where K: Key, S: BuildHasher,

source§

impl<K, S> Reader<K> for ThreadedRodeo<K, S>where K: Key + Hash, S: BuildHasher + Clone,