fn flush_response_headers(&mut self) {
        if self.sender.is_some() {
            let mut builder = http::Response::builder();

            if let Some(status) = self.response_status_code.take() {
                builder.status(status);
            }

            if let Some(version) = self.response_version.take() {
                builder.version(version);
            }

            for (name, values) in self.response_headers.drain() {
                for value in values {
                    builder.header(&name, value);
                }
            }

            if let Some(uri) = self.get_effective_uri() {
                builder.extension(EffectiveUri(uri));
            }

            // Include metrics in response, but only if it was created. If
            // metrics are disabled then it won't have been created.
            if let Some(metrics) = self.metrics.clone() {
                builder.extension(metrics);
            }

            self.complete(Ok(builder));
        }
    }
/// Mark the future as completed successfully with the response headers
/// received so far.
Mark the future as completed successfully with the response headers
received so far.
Mark the future as completed successfully with the response headers received so far .
fn flush_response_headers(&mut self) {
        if self.sender.is_some() {
            let mut builder = http::Response::builder();
            if let Some(status) = self.response_status_code.take() {
                builder.status(status);
            }
            if let Some(version) = self.response_version.take() {
                builder.version(version);
            }
            for (name, values) in self.response_headers.drain() {
                for value in values {
                    builder.header(&name, value);
                }
            }
            if let Some(uri) = self.get_effective_uri() {
                builder.extension(EffectiveUri(uri));
            }
            // Include metrics in response, but only if it was created. If
            // metrics are disabled then it won't have been created.
            if let Some(metrics) = self.metrics.clone() {
                builder.extension(metrics);
            }
            self.complete(Ok(builder));
        }
    }
fn flush_response_headers ( & mut self ) { if self . sender . is_some ( ) { let mut builder = http :: Response :: builder ( ) ; if let Some ( status ) = self . response_status_code . take ( ) { builder . status ( status ) ; } if let Some ( version ) = self . response_version . take ( ) { builder . version ( version ) ; } for ( name , values ) in self . response_headers . drain ( ) { for value in values { builder . header ( & name , value ) ; } } if let Some ( uri ) = self . get_effective_uri ( ) { builder . extension ( EffectiveUri ( uri ) ) ; } // Include metrics in response, but only if it was created. If // metrics are disabled then it won't have been created. if let Some ( metrics ) = self . metrics . clone ( ) { builder . extension ( metrics ) ; } self . complete ( Ok ( builder ) ) ; } }
Mark the future as completed successfully with the response headers
received so far.
Mark the future as completed successfully with the response headers received so far .
&mut self