async fn process_mailbox(mut mailbox: Mailbox, format: Format, exit: oneshot::Receiver<()>) {
    let inner = async move {
        while let Some(res) = mailbox.next().await {
            match ResponseOut::new(format, res) {
                Ok(out) => out.print(),
                Err(x) => {
                    error!("Repsonse out failed: {}", x);
                    break;
                }
            }
        }
    };

    tokio::select! {
        _ = inner => {}
        _ = exit => {}
    }
}
/// Helper function that loops, processing incoming responses to a mailbox
Helper function that loops, processing incoming responses to a mailbox
Helper function that loops processing incoming responses to a mailbox
async fn process_mailbox(mut mailbox: Mailbox, format: Format, exit: oneshot::Receiver<()>) {
    let inner = async move {
        while let Some(res) = mailbox.next().await {
            match ResponseOut::new(format, res) {
                Ok(out) => out.print(),
                Err(x) => {
                    error!("Repsonse out failed: {}", x);
                    break;
                }
            }
        }
    };
    tokio::select! {
        _ = inner => {}
        _ = exit => {}
    }
}
async fn process_mailbox ( mut mailbox : Mailbox , format : Format , exit : oneshot :: Receiver < ( ) > ) { let inner = async move { while let Some ( res ) = mailbox . next ( ) . await { match ResponseOut :: new ( format , res ) { Ok ( out ) => out . print ( ) , Err ( x ) => { error ! ( " " x ) ; break ; } } } } ; tokio :: select ! { inner { } exit { } } }
Helper function that loops, processing incoming responses to a mailbox
Helper function that loops processing incoming responses to a mailbox
mailbox
Mailbox
format
Format
exit
oneshot::Receiver<()>