Struct tower_http::cors::ExposeHeaders
source · pub struct ExposeHeaders(/* private fields */);
Expand description
Holds configuration for how to set the Access-Control-Expose-Headers
header.
See CorsLayer::expose_headers
for more details.
Implementations§
source§impl ExposeHeaders
impl ExposeHeaders
sourcepub fn any() -> Self
pub fn any() -> Self
Expose any / all headers by sending a wildcard (*
)
See CorsLayer::expose_headers
for more details.
sourcepub fn list<I>(headers: I) -> Selfwhere
I: IntoIterator<Item = HeaderName>,
pub fn list<I>(headers: I) -> Selfwhere
I: IntoIterator<Item = HeaderName>,
Set multiple exposed header names
See CorsLayer::expose_headers
for more details.
Trait Implementations§
source§impl Clone for ExposeHeaders
impl Clone for ExposeHeaders
source§fn clone(&self) -> ExposeHeaders
fn clone(&self) -> ExposeHeaders
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExposeHeaders
impl Debug for ExposeHeaders
source§impl Default for ExposeHeaders
impl Default for ExposeHeaders
source§fn default() -> ExposeHeaders
fn default() -> ExposeHeaders
Returns the “default value” for a type. Read more
source§impl<const N: usize> From<[HeaderName; N]> for ExposeHeaders
impl<const N: usize> From<[HeaderName; N]> for ExposeHeaders
source§fn from(arr: [HeaderName; N]) -> Self
fn from(arr: [HeaderName; N]) -> Self
Converts to this type from the input type.
source§impl From<Any> for ExposeHeaders
impl From<Any> for ExposeHeaders
source§impl From<Vec<HeaderName>> for ExposeHeaders
impl From<Vec<HeaderName>> for ExposeHeaders
source§fn from(vec: Vec<HeaderName>) -> Self
fn from(vec: Vec<HeaderName>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ExposeHeaders
impl RefUnwindSafe for ExposeHeaders
impl Send for ExposeHeaders
impl Sync for ExposeHeaders
impl Unpin for ExposeHeaders
impl UnwindSafe for ExposeHeaders
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)