Struct tower_http::cors::AllowCredentials
source · pub struct AllowCredentials(/* private fields */);
Available on crate feature
cors
only.Expand description
Holds configuration for how to set the Access-Control-Allow-Credentials
header.
See CorsLayer::allow_credentials
for more details.
Implementations§
source§impl AllowCredentials
impl AllowCredentials
sourcepub fn yes() -> Self
pub fn yes() -> Self
Allow credentials for all requests
See CorsLayer::allow_credentials
for more details.
sourcepub fn predicate<F>(f: F) -> Self
pub fn predicate<F>(f: F) -> Self
Allow credentials for some requests, based on a given predicate
The first argument to the predicate is the request origin.
See CorsLayer::allow_credentials
for more details.
Trait Implementations§
source§impl Clone for AllowCredentials
impl Clone for AllowCredentials
source§fn clone(&self) -> AllowCredentials
fn clone(&self) -> AllowCredentials
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 AllowCredentials
impl Debug for AllowCredentials
source§impl Default for AllowCredentials
impl Default for AllowCredentials
source§fn default() -> AllowCredentials
fn default() -> AllowCredentials
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AllowCredentials
impl Send for AllowCredentials
impl Sync for AllowCredentials
impl Unpin for AllowCredentials
impl !UnwindSafe for AllowCredentials
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