/// Continually condenses updates about the status of active links into an
/// `Observable<LinkStatusMap>`.
Continually condenses updates about the status of active links into an
`Observable`.
Continually condenses updates about the status of active links into an ` Observable ` .
async fn collate(receiver: LinkStateReceiver, link_status: Observable<LinkStatusMap>) {
    let link_status = &link_status;
    receiver
        .for_each_concurrent(None, |(node_link_id, node_id, mut ping_time_observer)| async move {
            while let Some(duration) = ping_time_observer.next().await {
                link_status
                    .edit(|link_status| {
                        link_status.insert(node_link_id, (node_id, duration));
                    })
                    .await;
            }
            link_status
                .edit(|link_status| {
                    link_status.remove(&node_link_id);
                })
                .await;
        })
        .await
}
async fn collate ( receiver : LinkStateReceiver , link_status : Observable < LinkStatusMap > ) { let link_status = & link_status ; receiver . for_each_concurrent ( None , | ( node_link_id , node_id , mut ping_time_observer ) | async move { while let Some ( duration ) = ping_time_observer . next ( ) . await { link_status . edit ( | link_status | { link_status . insert ( node_link_id , ( node_id , duration ) ) ; } ) . await ; } link_status . edit ( | link_status | { link_status . remove ( & node_link_id ) ; } ) . await ; } ) . await }
Continually condenses updates about the status of active links into an
`Observable<LinkStatusMap>`.
Continually condenses updates about the status of active links into an ` Observable<LinkStatusMap > ` .
receiver
LinkStateReceiver
link_status
Observable<LinkStatusMap>