Skip to main content

Memoizable

Trait 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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§