/// Produces code to add necessary HTTP headers to an `http::Response`.
Produces code to add necessary HTTP headers to an `http::Response`.
Produces code to add necessary HTTP headers to an ` http :: Response ` .
pub fn apply_header_fields(&self) -> TokenStream {
        let header_calls = self.fields.iter().filter_map(|response_field| {
            if let ResponseField::Header(ref field, ref header_name) = *response_field {
                let field_name =
                    field.ident.as_ref().expect("expected field to have an identifier");
                let span = field.span();
                Some(quote_spanned! {span=>
                    .header(ruma_api::exports::http::header::#header_name, response.#field_name)
                })
            } else {
                None
            }
        });
        quote! { #(#header_calls)* }
    }
pub fn apply_header_fields ( & self ) -> TokenStream { let header_calls = self . fields . iter ( ) . filter_map ( | response_field | { if let ResponseField :: Header ( ref field , ref header_name ) = * response_field { let field_name = field . ident . as_ref ( ) . expect ( " " ) ; let span = field . span ( ) ; Some ( quote_spanned ! { span header ( ruma_api exports http header header_name response field_name ) } ) } else { None } } ) ; quote ! { ( header_calls ) } }
Produces code to add necessary HTTP headers to an `http::Response`.
Produces code to add necessary HTTP headers to an ` http :: Response ` .
&self