Type Alias fluent_bundle::concurrent::FluentBundle

source ·
pub type FluentBundle<R> = FluentBundle<R, IntlLangMemoizer>;
Expand description

Specialized FluentBundle over concurrent IntlLangMemoizer.

A concurrent FluentBundle can be constructed with the FluentBundle::new_concurrent method.

See FluentBundle for the non-concurrent specialization.

Aliased Type§

struct FluentBundle<R> {
    pub locales: Vec<LanguageIdentifier>,
    /* private fields */
}

Fields§

§locales: Vec<LanguageIdentifier>

Implementations§

source§

impl<R> FluentBundle<R>

source

pub fn new_concurrent(locales: Vec<LanguageIdentifier>) -> Self

A constructor analogous to FluentBundle::new but operating on a concurrent version of IntlLangMemoizer over Mutex.

§Example
use fluent_bundle::concurrent::FluentBundle;
use fluent_bundle::FluentResource;
use unic_langid::langid;

let langid_en = langid!("en-US");
let mut bundle: FluentBundle<FluentResource> =
    FluentBundle::new_concurrent(vec![langid_en]);