Struct intern_arc::global::OrdInternerPool[][src]

pub struct OrdInternerPool { /* fields omitted */ }

A lazy map from type to ord-based interner

This is the backing implementation for ord_interner(), you can use it if you want the ability to drop the whole pool (note, though, that this will not drop the interned values — they are kept alive by the references you keep to them and are automatically freed when they are no longer references).

Implementations

impl OrdInternerPool[src]

pub fn new() -> Self[src]

pub fn get<T: ?Sized>(&self) -> Option<OrdInterner<T>> where
    T: Ord + Send + Sync + Any + 'static, 
[src]

Obtain an interner for the given type if it has been created already.

pub fn get_or_create<T: ?Sized>(&mut self) -> OrdInterner<T> where
    T: Ord + Send + Sync + Any + 'static, 
[src]

Obtain an interner for the given type, create it if necessary.

Trait Implementations

impl Default for OrdInternerPool[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.