async fn serve_event_stream(
    mut event_stream: EventStream,
    client_end: ClientEnd<fsys::EventStreamMarker>,
) -> Result<(), fidl::Error> {
    let listener = client_end.into_proxy().expect("cannot create proxy from client_end");
    while let Some(event) = event_stream.next().await {
        trace::duration!("component_manager", "events:fidl_get_next");
        // Create the basic Event FIDL object.
        // This will begin serving the Handler protocol asynchronously.
        let event_fidl_object = create_event_fidl_object(event)?;

        if let Err(e) = listener.on_event(event_fidl_object) {
            // It's not an error for the client to drop the listener.
            if !e.is_closed() {
                warn!("Unexpected error while serving EventStream: {:?}", e);
            }
            break;
        }
    }
    Ok(())
}
/// Serves EventStream FIDL requests received over the provided stream.
Serves EventStream FIDL requests received over the provided stream.
Serves EventStream FIDL requests received over the provided stream .
async fn serve_event_stream(
    mut event_stream: EventStream,
    client_end: ClientEnd<fsys::EventStreamMarker>,
) -> Result<(), fidl::Error> {
    let listener = client_end.into_proxy().expect("cannot create proxy from client_end");
    while let Some(event) = event_stream.next().await {
        trace::duration!("component_manager", "events:fidl_get_next");
        // Create the basic Event FIDL object.
        // This will begin serving the Handler protocol asynchronously.
        let event_fidl_object = create_event_fidl_object(event)?;
        if let Err(e) = listener.on_event(event_fidl_object) {
            // It's not an error for the client to drop the listener.
            if !e.is_closed() {
                warn!("Unexpected error while serving EventStream: {:?}", e);
            }
            break;
        }
    }
    Ok(())
}
async fn serve_event_stream ( mut event_stream : EventStream , client_end : ClientEnd < fsys :: EventStreamMarker > , ) -> Result < ( ) , fidl :: Error > { let listener = client_end . into_proxy ( ) . expect ( " " ) ; while let Some ( event ) = event_stream . next ( ) . await { trace :: duration ! ( " " " " ) ; // Create the basic Event FIDL object. // This will begin serving the Handler protocol asynchronously. let event_fidl_object = create_event_fidl_object ( event ) ? ; if let Err ( e ) = listener . on_event ( event_fidl_object ) { // It's not an error for the client to drop the listener. if ! e . is_closed ( ) { warn ! ( " " e ) ; } break ; } } Ok ( ( ) ) }
Serves EventStream FIDL requests received over the provided stream.
Serves EventStream FIDL requests received over the provided stream .
event_stream
EventStream
client_end
ClientEnd<fsys::EventStreamMarker>
event_stream
EventStream
client_end
ClientEnd<fsys::EventStreamMarker>