pub struct AllowCredentials(/* private fields */);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() -> AllowCredentials
pub fn yes() -> AllowCredentials
Allow credentials for all requests
See CorsLayer::allow_credentials for more details.
Sourcepub fn predicate<F>(f: F) -> AllowCredentials
pub fn predicate<F>(f: F) -> AllowCredentials
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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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
Source§impl From<bool> for AllowCredentials
impl From<bool> for AllowCredentials
Source§fn from(v: bool) -> AllowCredentials
fn from(v: bool) -> AllowCredentials
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AllowCredentials
impl !UnwindSafe for AllowCredentials
impl Freeze for AllowCredentials
impl Send for AllowCredentials
impl Sync for AllowCredentials
impl Unpin for AllowCredentials
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more