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();

        if let Some(message) = config_lock
            .language_bundles
            .iter()
            .filter_map(|language_bundle| language_bundle.bundle.get_message(message_id))
            .next()
        {
            Some((closure)(message))
        } else {
            None
        }
    }
/// 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();
        if let Some(message) = config_lock
            .language_bundles
            .iter()
            .filter_map(|language_bundle| language_bundle.bundle.get_message(message_id))
            .next()
        {
            Some((closure)(message))
        } else {
            None
        }
    }
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 ( ) ; if let Some ( message ) = config_lock . language_bundles . iter ( ) . filter_map ( | language_bundle | language_bundle . bundle . get_message ( message_id ) ) . next ( ) { Some ( ( closure ) ( message ) ) } else { None } }
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