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 Freeze for AllowCredentials
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