Trait symtern::traits::Resolve
[−]
[src]
pub trait Resolve { type Input; type Output; fn resolve(self, symbol: Self::Input) -> Result<Self::Output>; }
Trait used to resolve symbols back to
Associated Types
type Input
Type used to represent interned values.
type Output
Type stored by the interner and made available with resolve
.
Required Methods
fn resolve(self, symbol: Self::Input) -> Result<Self::Output>
Look up and return a reference to the value represented by a symbol, or an error if the symbol was not found.
let s = match some_pool.resolve(sym) { Ok(s) => s, Err(err) => return Err(MyErrorType::from(err)), };
Implementors
impl<'a, T: ?Sized, I> Resolve for &'a Pool<T, I> where T: ToOwned + Eq + Hash, T::Owned: Eq + Hash + Borrow<T>, I: SymbolId
impl<'a, W, WS> Resolve for &'a Inline<W> where &'b W: Resolve<Input=WS, Output=&'b str>, WS: 'a + Symbol, WS::Id: Pack + SymbolId
impl<'a, W, BI, BO: ?Sized> Resolve for &'a Luma<W> where &'b W: Resolve<Input=BI, Output=&'b BO>, BI: Symbol + Symbol, BO: 'a