pub fn with_arg(
        mut self,
        key: &'static str,
        f: impl Fn(&T, &Env) -> FluentValue<'static> + 'static,
    ) -> Self {
        self.args
            .get_or_insert(Vec::new())
            .push((key, ArgSource(Arc::new(f))));
        self
    }
/// Add a named argument and a corresponding closure. This closure
/// is a function that will return a value for the given key from the current
/// environment and data.
Add a named argument and a corresponding closure. This closure
is a function that will return a value for the given key from the current
environment and data.
Add a named argument and a corresponding closure . This closure is a function that will return a value for the given key from the current environment and data .
pub fn with_arg(
        mut self,
        key: &'static str,
        f: impl Fn(&T, &Env) -> FluentValue<'static> + 'static,
    ) -> Self {
        self.args
            .get_or_insert(Vec::new())
            .push((key, ArgSource(Arc::new(f))));
        self
    }
pub fn with_arg ( mut self , key : & ' static str , f : impl Fn ( & T , & Env ) -> FluentValue < ' static > + ' static , ) -> Self { self . args . get_or_insert ( Vec :: new ( ) ) . push ( ( key , ArgSource ( Arc :: new ( f ) ) ) ) ; self }
Add a named argument and a corresponding closure.
Add a named argument and a corresponding closure .
mut self
key
&'static str
f
impl Fn(&T, &Env) -> FluentValue<'static> + 'static
mut self
key
&'static str
f
impl Fn(&T, &Env) -> FluentValue<'static> + 'static