Skip to main content

Intern

Trait Intern 

Source
pub trait Intern {
    type Interned<'a>: Atom
       where Self: 'a;

    // Required methods
    fn intern_str(&self, s: &str) -> Self::Interned<'_>;
    fn intern_formatted_str<T: Display + ?Sized>(
        &self,
        value: &T,
        upper_size: usize,
    ) -> Result<Self::Interned<'_>, Error>;
}

Required Associated Types§

Source

type Interned<'a>: Atom where Self: 'a

Required Methods§

Source

fn intern_str(&self, s: &str) -> Self::Interned<'_>

Source

fn intern_formatted_str<T: Display + ?Sized>( &self, value: &T, upper_size: usize, ) -> Result<Self::Interned<'_>, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Intern for DroplessInterner

Source§

type Interned<'a> = Interned<'a, str> where Self: 'a

Source§

impl Intern for Interner

Source§

type Interned<'a> = Interned<'a, str> where Self: 'a