Skip to main content

Intern

Trait Intern 

Source
pub trait Intern {
    type Static;

    // Required method
    fn intern(self, pool: &mut StringPool) -> Self::Static;
}
Expand description

Moves a string into the pool, giving it a ’static lifetime

Required Associated Types§

Required Methods§

Source

fn intern(self, pool: &mut StringPool) -> Self::Static

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Intern for &str

Source§

type Static = &'static str

Source§

fn intern(self, pool: &mut StringPool) -> Self::Static

Source§

impl<T> Intern for Option<T>
where T: Intern,

Source§

type Static = Option<<T as Intern>::Static>

Source§

fn intern(self, pool: &mut StringPool) -> Self::Static

Source§

impl<T> Intern for Vec<T>
where T: Intern,

Source§

type Static = Vec<<T as Intern>::Static>

Source§

fn intern(self, pool: &mut StringPool) -> Self::Static

Implementors§

Source§

impl<Id: Identifier, T: Intern> Intern for Registry<Id, T>

Source§

type Static = Registry<Id, <T as Intern>::Static>