pub async fn wait_async(&self) -> &HeaderMap {
        loop {
            // Fast path: If the headers are already set, return them.
            if let Some(headers) = self.try_get() {
                return headers;
            }

            // Headers not set, jump into the slow path by creating a new
            // listener for the ready event.
            let listener = self.shared.ready.listen();

            // Double-check that the headers are not set.
            if let Some(headers) = self.try_get() {
                return headers;
            }

            // Otherwise, wait asynchronously until they are.
            listener.await;

            // If we got the notification, then the headers are likely to be
            // set.
            if let Some(headers) = self.try_get() {
                return headers;
            }
        }
    }
/// Wait asynchronously until the trailer headers arrive, and then return
/// them.
Wait asynchronously until the trailer headers arrive, and then return
them.
Wait asynchronously until the trailer headers arrive and then return them .
pub async fn wait_async(&self) -> &HeaderMap {
        loop {
            // Fast path: If the headers are already set, return them.
            if let Some(headers) = self.try_get() {
                return headers;
            }
            // Headers not set, jump into the slow path by creating a new
            // listener for the ready event.
            let listener = self.shared.ready.listen();
            // Double-check that the headers are not set.
            if let Some(headers) = self.try_get() {
                return headers;
            }
            // Otherwise, wait asynchronously until they are.
            listener.await;
            // If we got the notification, then the headers are likely to be
            // set.
            if let Some(headers) = self.try_get() {
                return headers;
            }
        }
    }
pub async fn wait_async ( & self ) -> & HeaderMap { loop { // Fast path: If the headers are already set, return them. if let Some ( headers ) = self . try_get ( ) { return headers ; } // Headers not set, jump into the slow path by creating a new // listener for the ready event. let listener = self . shared . ready . listen ( ) ; // Double-check that the headers are not set. if let Some ( headers ) = self . try_get ( ) { return headers ; } // Otherwise, wait asynchronously until they are. listener . await ; // If we got the notification, then the headers are likely to be // set. if let Some ( headers ) = self . try_get ( ) { return headers ; } } }
Wait asynchronously until the trailer headers arrive, and then return
them.
Wait asynchronously until the trailer headers arrive and then return them .
&self