fn push_to_all_clients(clients: &mut Clients, chunk: String) {
    // Clean up non reachable clients
    let drained = clients.drain_filter(|client| {
        let result = client.tx.try_send_data(Bytes::from(chunk.clone()));
        match result {
            Err(_) => true,
            _ => false,
        }
    });
    for client in drained {
        info!("SSE Client drop: {:?}", &client.dest);
        client.tx.abort();
    }
}
/// Push a message for the event to all clients registered on the channel.
///
/// The message is first serialized and then send to all registered
/// clients on the given channel, if any.
///
/// Returns an error if the serialization fails.
Push a message for the event to all clients registered on the channel.
The message is first serialized and then send to all registered
clients on the given channel, if any.

Returns an error if the serialization fails.
Push a message for the event to all clients registered on the channel . The message is first serialized and then send to all registered clients on the given channel if any . Returns an error if the serialization fails .
fn push_to_all_clients(clients: &mut Clients, chunk: String) {
    // Clean up non reachable clients
    let drained = clients.drain_filter(|client| {
        let result = client.tx.try_send_data(Bytes::from(chunk.clone()));
        match result {
            Err(_) => true,
            _ => false,
        }
    });
    for client in drained {
        info!("SSE Client drop: {:?}", &client.dest);
        client.tx.abort();
    }
}
fn push_to_all_clients ( clients : & mut Clients , chunk : String ) { // Clean up non reachable clients let drained = clients . drain_filter ( | client | { let result = client . tx . try_send_data ( Bytes :: from ( chunk . clone ( ) ) ) ; match result { Err ( _ ) => true , _ => false , } } ) ; for client in drained { info ! ( " " client dest ) ; client . tx . abort ( ) ; } }
Push a message for the event to all clients registered on the channel.
Push a message for the event to all clients registered on the channel .
clients
&mut Clients
chunk
String
clients
&mut Clients
chunk
String