pub fn bind_ime(&self, mut stream: uii::InputMethodEditorRequestStream) {
        let self_clone = self.clone();
        let self_clone_2 = self.clone();
        fuchsia_async::Task::spawn(
            async move {
                while let Some(msg) = stream
                    .try_next()
                    .await
                    .context("error reading value from IME request stream")?
                {
                    self_clone
                        .handle_ime_message(msg)
                        .await
                        .unwrap_or_else(|e| fx_log_warn!("error handling ime message: {:?}", e));
                }
                Ok(())
            }
            .unwrap_or_else(|e: anyhow::Error| fx_log_err!("{:?}", e))
            .then(|()| {
                async move {
                    // this runs when IME stream closes
                    // clone to ensure we only hold one lock at a time
                    let text_manager = self_clone_2.0.lock().await.text_manager.clone();
                    text_manager.update_keyboard_visibility_from_ime(&self_clone_2.0, false).await;
                }
            }),
        )
        .detach();
    }
/// Handles all state updates passed down the `InputMethodEditorRequestStream`.
Handles all state updates passed down the `InputMethodEditorRequestStream`.
Handles all state updates passed down the ` InputMethodEditorRequestStream ` .
pub fn bind_ime(&self, mut stream: uii::InputMethodEditorRequestStream) {
        let self_clone = self.clone();
        let self_clone_2 = self.clone();
        fuchsia_async::Task::spawn(
            async move {
                while let Some(msg) = stream
                    .try_next()
                    .await
                    .context("error reading value from IME request stream")?
                {
                    self_clone
                        .handle_ime_message(msg)
                        .await
                        .unwrap_or_else(|e| fx_log_warn!("error handling ime message: {:?}", e));
                }
                Ok(())
            }
            .unwrap_or_else(|e: anyhow::Error| fx_log_err!("{:?}", e))
            .then(|()| {
                async move {
                    // this runs when IME stream closes
                    // clone to ensure we only hold one lock at a time
                    let text_manager = self_clone_2.0.lock().await.text_manager.clone();
                    text_manager.update_keyboard_visibility_from_ime(&self_clone_2.0, false).await;
                }
            }),
        )
        .detach();
    }
pub fn bind_ime ( & self , mut stream : uii :: InputMethodEditorRequestStream ) { let self_clone = self . clone ( ) ; let self_clone_2 = self . clone ( ) ; fuchsia_async :: Task :: spawn ( async move { while let Some ( msg ) = stream . try_next ( ) . await . context ( " " ) ? { self_clone . handle_ime_message ( msg ) . await . unwrap_or_else ( | e | fx_log_warn ! ( " " e ) ) ; } Ok ( ( ) ) } . unwrap_or_else ( | e : anyhow :: Error | fx_log_err ! ( " " e ) ) . then ( | ( ) | { async move { // this runs when IME stream closes // clone to ensure we only hold one lock at a time let text_manager = self_clone_2 . 0 . lock ( ) . await . text_manager . clone ( ) ; text_manager . update_keyboard_visibility_from_ime ( & self_clone_2 . 0 , false ) . await ; } } ) , ) . detach ( ) ; }
Handles all state updates passed down the `InputMethodEditorRequestStream`.
Handles all state updates passed down the ` InputMethodEditorRequestStream ` .
&self
stream
uii::InputMethodEditorRequestStream
&self
stream
uii::InputMethodEditorRequestStream