Trait cstree::interning::Resolver [−][src]
A generic interface that allows using any underlying interner only
for its resolution capabilities, allowing only key -> str
lookups
Required methods
pub fn resolve(&'a self, key: &K) -> &'a str
[src]
Resolves the given key into a string
Panics
Panics if the key is not contained in the current Resolver
pub fn try_resolve(&'a self, key: &K) -> Option<&'a str>
[src]
Attempts to resolve the given key into a string, returning None
if it cannot be found
pub unsafe fn resolve_unchecked(&'a self, key: &K) -> &'a str
[src]
Resolves a string by its key without preforming bounds checks
Safety
The key must be valid for the current Resolver
pub fn contains_key(&self, key: &K) -> bool
[src]
Returns true
if the current interner contains the given key
pub fn len(&self) -> usize
[src]
Gets the number of currently interned strings
Provided methods
Loading content...Implementations on Foreign Types
impl<K, S> Resolver<K> for RodeoReader<K, S> where
K: Key,
[src]
K: Key,
pub fn resolve(&'a self, key: &K) -> &'a str
[src]
pub fn try_resolve(&'a self, key: &K) -> Option<&'a str>
[src]
pub unsafe fn resolve_unchecked(&'a self, key: &K) -> &'a str
[src]
pub fn contains_key(&self, key: &K) -> bool
[src]
pub fn len(&self) -> usize
[src]
impl<K, I> Resolver<K> for Box<I, Global> where
I: Resolver<K> + 'static + ?Sized,
K: Key,
[src]
I: Resolver<K> + 'static + ?Sized,
K: Key,
pub fn resolve(&'a self, key: &K) -> &'a str
[src]
pub fn try_resolve(&'a self, key: &K) -> Option<&'a str>
[src]
pub unsafe fn resolve_unchecked(&'a self, key: &K) -> &'a str
[src]
pub fn contains_key(&self, key: &K) -> bool
[src]
pub fn len(&self) -> usize
[src]
impl<K, S> Resolver<K> for Rodeo<K, S> where
K: Key,
[src]
K: Key,
pub fn resolve(&'a self, key: &K) -> &'a str
[src]
pub fn try_resolve(&'a self, key: &K) -> Option<&'a str>
[src]
pub unsafe fn resolve_unchecked(&'a self, key: &K) -> &'a str
[src]
pub fn contains_key(&self, key: &K) -> bool
[src]
pub fn len(&self) -> usize
[src]
impl<K> Resolver<K> for RodeoResolver<K> where
K: Key,
[src]
K: Key,