pub fn spawn_log_consumer(&self, connector: LogConnectorProxy) {
        let handler = self.clone();
        fasync::spawn(async move {
            match connector.take_log_connection_listener().await {
                Ok(Some(listener)) => {
                    let mut connections =
                        listener.into_stream().expect("getting requeststream from serverend");
                    while let Ok(Some(connection)) = connections.try_next().await {
                        match connection {
                            LogConnectionListenerRequest::OnNewConnection {
                                connection: LogConnection { log_request, source_identity },
                                control_handle: _,
                            } => {
                                handler.spawn_log_sink_handler(
                                    log_request
                                        .into_stream()
                                        .expect("getting LogSinkRequestStream from serverend"),
                                    source_identity,
                                );
                            }
                        };
                    }
                }
                Ok(None) => {
                    eprintln!("local realm already gave out LogConnectionListener, skipping logs")
                }
                Err(why) => {
                    eprintln!("error retrieving LogConnectionListener from LogConnector: {:?}", why)
                }
            }
        });
    }
/// Spawn a task which attempts to act as `LogConnectionListener` for its parent realm, eventually
/// passing `LogSink` connections into the manager.
Spawn a task which attempts to act as `LogConnectionListener` for its parent realm, eventually
passing `LogSink` connections into the manager.
Spawn a task which attempts to act as ` LogConnectionListener ` for its parent realm eventually passing ` LogSink ` connections into the manager .
pub fn spawn_log_consumer(&self, connector: LogConnectorProxy) {
        let handler = self.clone();
        fasync::spawn(async move {
            match connector.take_log_connection_listener().await {
                Ok(Some(listener)) => {
                    let mut connections =
                        listener.into_stream().expect("getting requeststream from serverend");
                    while let Ok(Some(connection)) = connections.try_next().await {
                        match connection {
                            LogConnectionListenerRequest::OnNewConnection {
                                connection: LogConnection { log_request, source_identity },
                                control_handle: _,
                            } => {
                                handler.spawn_log_sink_handler(
                                    log_request
                                        .into_stream()
                                        .expect("getting LogSinkRequestStream from serverend"),
                                    source_identity,
                                );
                            }
                        };
                    }
                }
                Ok(None) => {
                    eprintln!("local realm already gave out LogConnectionListener, skipping logs")
                }
                Err(why) => {
                    eprintln!("error retrieving LogConnectionListener from LogConnector: {:?}", why)
                }
            }
        });
    }
pub fn spawn_log_consumer ( & self , connector : LogConnectorProxy ) { let handler = self . clone ( ) ; fasync :: spawn ( async move { match connector . take_log_connection_listener ( ) . await { Ok ( Some ( listener ) ) => { let mut connections = listener . into_stream ( ) . expect ( " " ) ; while let Ok ( Some ( connection ) ) = connections . try_next ( ) . await { match connection { LogConnectionListenerRequest :: OnNewConnection { connection : LogConnection { log_request , source_identity } , control_handle : _ , } => { handler . spawn_log_sink_handler ( log_request . into_stream ( ) . expect ( " " ) , source_identity , ) ; } } ; } } Ok ( None ) => { eprintln ! ( " " ) } Err ( why ) => { eprintln ! ( " " why ) } } } ) ; }
Spawn a task which attempts to act as `LogConnectionListener` for its parent realm, eventually
passing `LogSink` connections into the manager.
Spawn a task which attempts to act as ` LogConnectionListener ` for its parent realm eventually passing ` LogSink ` connections into the manager .
&self
connector
LogConnectorProxy
&self
connector
LogConnectorProxy