Struct symtern::adaptors::Inline [] [src]

pub struct Inline<W> { /* fields omitted */ }

Interner optimized for short strings.

See the module-level documentation for more information.

Methods

impl<W> Inline<W>
[src]

Create a new, empty symbol pool

Trait Implementations

impl<W: Copy> Copy for Inline<W>
[src]

impl<W: Clone> Clone for Inline<W>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<W: Debug> Debug for Inline<W>
[src]

Formats the value using the given formatter.

impl<W> Default for Inline<W> where W: Default
[src]

Returns the "default value" for a type. Read more

impl<W> From<W> for Inline<W>
[src]

Performs the conversion.

impl<W> Len for Inline<W> where W: Len + Pool, W::Symbol::Id: Pack + ToPrimitive
[src]

Fetch the number of items contained in the pool. The returned value does not count values inlined in symbols.

Check if the pool is "empty", i.e. has zero stored values.

Because strings inlined in symbols are not stored in the pool, they do not affect the result of this method.

Check if the number of interned symbols has reached the maximum allowed for the pool's ID type.

impl<'a, W, WS> Intern for &'a Inline<W> where W: Len + Pool<Symbol=WS>, &'a W: Intern<Input=str, Symbol=W::Symbol>, WS: Symbol, WS::Id: Pack
[src]

Type of value accepted by intern.

Type used to represent interned values.

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, WS> Intern for &'a mut Inline<W> where W: Len + Pool<Symbol=WS>, &'a mut W: Intern<Input=str, Symbol=W::Symbol>, WS: Symbol, WS::Id: Pack
[src]

Type of value accepted by intern.

Type used to represent interned values.

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, WS> Resolve for &'a Inline<W> where &'b W: Resolve<Input=WS, Output=&'b str>, WS: 'a + Symbol, WS::Id: Pack + SymbolId
[src]

Type used to represent interned values.

Type stored by the interner and made available with resolve.

Look up and return a reference to the value represented by a symbol, or an error if the symbol was not found. Read more