Struct symtern::adaptors::Luma
[−]
[src]
pub struct Luma<W> { /* fields omitted */ }
Interner adaptor that utilizes interior mutability to implement the
Intern
trait.
See the module-level documentation for more information.
Methods
impl<W> Luma<W>
[src]
Trait Implementations
impl<W: Default> Default for Luma<W>
[src]
impl<W> From<W> for Luma<W>
[src]
fn from(w: W) -> Self
Performs the conversion.
impl<'a, W, BS, BI: ?Sized> Intern for &'a Luma<W> where &'b mut W: Intern<Symbol=BS, Input=BI>, BS: Symbol + Symbol
[src]
type Input = BI
Type of value accepted by intern
.
type Symbol = Sym<'a, BS>
Type used to represent interned values.
fn intern(self, input: &Self::Input) -> Result<Self::Symbol>
Fetch the symbol that corresponds to the given value. If the value does not map to any existing symbol, create and return a new one. This method may return an error if the interner encounters any error while storing the value. Read more
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
[src]
type Input = Sym<'a, BI>
Type used to represent interned values.
type Output = Ref<'a, BO>
Type stored by the interner and made available with resolve
.
fn resolve(self, sym: 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. Read more