pub(crate) async fn contact_load_batch(&self, contact_id_list: Vec<String>) -> Vec<Contact<T>> {
        debug!("contact_load_batch(contact_id_list = {:?})", contact_id_list);
        let mut contact_list = vec![];
        let mut stream = tokio_stream::iter(contact_id_list)
            .map(|contact_id| self.contact_load(contact_id))
            .buffer_unordered(16);
        while let Some(result) = stream.next().await {
            if let Ok(contact) = result {
                contact_list.push(contact);
            }
        }
        contact_list
    }
/// Batch load contacts with a default batch size of 16.
///
/// Reference: [Batch execution of futures in the tokio runtime](https://users.rust-lang.org/t/batch-execution-of-futures-in-the-tokio-runtime-or-max-number-of-active-futures-at-a-time/47659).
///
/// Note the API change: `tokio::stream::iter` is now temporarily `tokio_stream::iter`, according to
/// [tokio's tutorial](https://tokio.rs/tokio/tutorial/streams), it will be moved back to the `tokio`
/// crate when the `Stream` trait is stable.
Batch load contacts with a default batch size of 16.
Reference: [Batch execution of futures in the tokio runtime].


Batch load contacts with a default batch size of 16 . Reference : [ Batch execution of futures in the tokio runtime ] .
pub(crate) async fn contact_load_batch(&self, contact_id_list: Vec<String>) -> Vec<Contact<T>> {
        debug!("contact_load_batch(contact_id_list = {:?})", contact_id_list);
        let mut contact_list = vec![];
        let mut stream = tokio_stream::iter(contact_id_list)
            .map(|contact_id| self.contact_load(contact_id))
            .buffer_unordered(16);
        while let Some(result) = stream.next().await {
            if let Ok(contact) = result {
                contact_list.push(contact);
            }
        }
        contact_list
    }
pub ( crate ) async fn contact_load_batch ( & self , contact_id_list : Vec < String > ) -> Vec < Contact < T > > { debug ! ( " " contact_id_list ) ; let mut contact_list = vec ! [ ] ; let mut stream = tokio_stream :: iter ( contact_id_list ) . map ( | contact_id | self . contact_load ( contact_id ) ) . buffer_unordered ( 16 ) ; while let Some ( result ) = stream . next ( ) . await { if let Ok ( contact ) = result { contact_list . push ( contact ) ; } } contact_list }
Batch load contacts with a default batch size of 16.
Batch load contacts with a default batch size of 16 .
&self
contact_id_list
Vec<String>
&self
contact_id_list
Vec<String>