pub struct ExposeHeaders(/* private fields */);
Available on crate feature
cors
only.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