pub fn with_fluent_message<OUT, C>(&self, message_id: &str, closure: C) -> Option<OUT>
    where
        C: Fn(fluent::FluentMessage<'_>) -> OUT,
    {
        let config_lock = self.language_config.read();

        config_lock
            .language_bundles
            .iter()
            .find_map(|language_bundle| language_bundle.bundle.get_message(message_id))
            .map(closure)
    }
/// Run the `closure` with the message that matches the specified
/// `message_id` (if it is available in any of the languages
/// currently loaded, including the fallback language). Returns
/// `Some` of whatever whatever the closure returns, or `None` if
/// no messages were found matching the `message_id`.
Run the `closure` with the message that matches the specified
`message_id` (if it is available in any of the languages
currently loaded, including the fallback language).
Run the ` closure ` with the message that matches the specified ` message_id ` ( if it is available in any of the languages currently loaded including the fallback language ) .
pub fn with_fluent_message<OUT, C>(&self, message_id: &str, closure: C) -> Option<OUT>
    where
        C: Fn(fluent::FluentMessage<'_>) -> OUT,
    {
        let config_lock = self.language_config.read();
        config_lock
            .language_bundles
            .iter()
            .find_map(|language_bundle| language_bundle.bundle.get_message(message_id))
            .map(closure)
    }
pub fn with_fluent_message < OUT , C > ( & self , message_id : & str , closure : C ) -> Option < OUT > where C : Fn ( fluent :: FluentMessage < ' _ > ) -> OUT , { let config_lock = self . language_config . read ( ) ; config_lock . language_bundles . iter ( ) . find_map ( | language_bundle | language_bundle . bundle . get_message ( message_id ) ) . map ( closure ) }
Run the `closure` with the message that matches the specified
`message_id` (if it is available in any of the languages
currently loaded, including the fallback language).
Run the ` closure ` with the message that matches the specified ` message_id ` ( if it is available in any of the languages currently loaded including the fallback language ) .
&self
message_id
&str
closure
C
&self
message_id
&str
closure
C