pub async fn handle_annotation_controller_stream(
    annotations: Arc<Mutex<AnnotationHolder>>,
    mut stream: felement::AnnotationControllerRequestStream,
) {
    let mut watch_subscriber = annotations.lock().await.new_watch_subscriber();
    while let Ok(Some(request)) = stream.try_next().await {
        if let Err(e) = handle_annotation_controller_request(
            &mut *annotations.lock().await,
            &mut watch_subscriber,
            request,
        ) {
            error!("AnnotationControllerRequest error: {}. Dropping connection", e);
            stream.control_handle().shutdown_with_epitaph(zx::Status::BAD_STATE);
            return;
        }
    }
}
// Convenient function to handle an AnnotationControllerRequestStream.
Convenient function to handle an AnnotationControllerRequestStream.
Convenient function to handle an AnnotationControllerRequestStream .
pub async fn handle_annotation_controller_stream(
    annotations: Arc<Mutex<AnnotationHolder>>,
    mut stream: felement::AnnotationControllerRequestStream,
) {
    let mut watch_subscriber = annotations.lock().await.new_watch_subscriber();
    while let Ok(Some(request)) = stream.try_next().await {
        if let Err(e) = handle_annotation_controller_request(
            &mut *annotations.lock().await,
            &mut watch_subscriber,
            request,
        ) {
            error!("AnnotationControllerRequest error: {}. Dropping connection", e);
            stream.control_handle().shutdown_with_epitaph(zx::Status::BAD_STATE);
            return;
        }
    }
}
pub async fn handle_annotation_controller_stream ( annotations : Arc < Mutex < AnnotationHolder > > , mut stream : felement :: AnnotationControllerRequestStream , ) { let mut watch_subscriber = annotations . lock ( ) . await . new_watch_subscriber ( ) ; while let Ok ( Some ( request ) ) = stream . try_next ( ) . await { if let Err ( e ) = handle_annotation_controller_request ( & mut * annotations . lock ( ) . await , & mut watch_subscriber , request , ) { error ! ( " " e ) ; stream . control_handle ( ) . shutdown_with_epitaph ( zx :: Status :: BAD_STATE ) ; return ; } } }
Convenient function to handle an AnnotationControllerRequestStream.
Convenient function to handle an AnnotationControllerRequestStream .
annotations
Arc<Mutex<AnnotationHolder>>
stream
felement::AnnotationControllerRequestStream
annotations
Arc<Mutex<AnnotationHolder>>
stream
felement::AnnotationControllerRequestStream