Trait intl_memoizer::Memoizable

source ·
pub trait Memoizable {
    type Args: 'static + Eq + Hash + Clone;
    type Error;

    // Required method
    fn construct(
        lang: LanguageIdentifier,
        args: Self::Args
    ) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

The trait that needs to be implemented for each intl formatter that needs to be memoized.

Required Associated Types§

source

type Args: 'static + Eq + Hash + Clone

Type of the arguments that are used to construct the formatter.

source

type Error

Type of any errors that can occur during the construction process.

Required Methods§

source

fn construct( lang: LanguageIdentifier, args: Self::Args ) -> Result<Self, Self::Error>
where Self: Sized,

Construct a formatter. This maps the Self::Args type to the actual constructor for an intl formatter.

Implementors§