pub fn expose_headers<U, H>(mut self, headers: U) -> Cors
    where
        U: IntoIterator<Item = H>,
        HeaderName: TryFrom<H>,
        <HeaderName as TryFrom<H>>::Error: Into<HttpError>,
    {
        for h in headers {
            match HeaderName::try_from(h) {
                Ok(method) => {
                    self.expose_hdrs.insert(method);
                }
                Err(e) => {
                    self.error = Some(e.into());
                    break;
                }
            }
        }
        self
    }
/// Set a list of headers which are safe to expose to the API of a CORS API
/// specification. This corresponds to the
/// `Access-Control-Expose-Headers` response header.
///
/// This is the `list of exposed headers` in the
/// [Resource Processing Model](https://www.w3.org/TR/cors/#resource-processing-model).
///
/// This defaults to an empty set.
Set a list of headers which are safe to expose to the API of a CORS API
specification. This corresponds to the
`Access-Control-Expose-Headers` response header.

This is the `list of exposed headers` in the
[Resource Processing Model].

This defaults to an empty set.
Set a list of headers which are safe to expose to the API of a CORS API specification . This corresponds to the ` Access - Control - Expose - Headers ` response header . This is the ` list of exposed headers ` in the [ Resource Processing Model ] . This defaults to an empty set .
pub fn expose_headers<U, H>(mut self, headers: U) -> Cors
    where
        U: IntoIterator<Item = H>,
        HeaderName: TryFrom<H>,
        <HeaderName as TryFrom<H>>::Error: Into<HttpError>,
    {
        for h in headers {
            match HeaderName::try_from(h) {
                Ok(method) => {
                    self.expose_hdrs.insert(method);
                }
                Err(e) => {
                    self.error = Some(e.into());
                    break;
                }
            }
        }
        self
    }
pub fn expose_headers < U , H > ( mut self , headers : U ) -> Cors where U : IntoIterator < Item = H > , HeaderName : TryFrom < H > , < HeaderName as TryFrom < H > > :: Error : Into < HttpError > , { for h in headers { match HeaderName :: try_from ( h ) { Ok ( method ) => { self . expose_hdrs . insert ( method ) ; } Err ( e ) => { self . error = Some ( e . into ( ) ) ; break ; } } } self }
Set a list of headers which are safe to expose to the API of a CORS API
specification.
Set a list of headers which are safe to expose to the API of a CORS API specification .
mut self
headers
U
mut self
headers
U