pub struct CorsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> CorsBuilder<S>
impl<S: State> CorsBuilder<S>
Sourcepub fn allow_credentials(
self,
value: bool,
) -> CorsBuilder<SetAllowCredentials<S>>where
S::AllowCredentials: IsUnset,
pub fn allow_credentials(
self,
value: bool,
) -> CorsBuilder<SetAllowCredentials<S>>where
S::AllowCredentials: IsUnset,
Sourcepub fn maybe_allow_credentials(
self,
value: Option<bool>,
) -> CorsBuilder<SetAllowCredentials<S>>where
S::AllowCredentials: IsUnset,
pub fn maybe_allow_credentials(
self,
value: Option<bool>,
) -> CorsBuilder<SetAllowCredentials<S>>where
S::AllowCredentials: IsUnset,
Sourcepub fn allow_headers(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowHeaders<S>>where
S::AllowHeaders: IsUnset,
pub fn allow_headers(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowHeaders<S>>where
S::AllowHeaders: IsUnset,
Sourcepub fn maybe_allow_headers(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowHeaders<S>>where
S::AllowHeaders: IsUnset,
pub fn maybe_allow_headers(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowHeaders<S>>where
S::AllowHeaders: IsUnset,
Sourcepub fn allow_methods(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowMethods<S>>where
S::AllowMethods: IsUnset,
pub fn allow_methods(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowMethods<S>>where
S::AllowMethods: IsUnset,
Sourcepub fn maybe_allow_methods(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowMethods<S>>where
S::AllowMethods: IsUnset,
pub fn maybe_allow_methods(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowMethods<S>>where
S::AllowMethods: IsUnset,
Sourcepub fn allow_origins(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowOrigins<S>>where
S::AllowOrigins: IsUnset,
pub fn allow_origins(
self,
value: Vec<String>,
) -> CorsBuilder<SetAllowOrigins<S>>where
S::AllowOrigins: IsUnset,
Sourcepub fn maybe_allow_origins(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowOrigins<S>>where
S::AllowOrigins: IsUnset,
pub fn maybe_allow_origins(
self,
value: Option<Vec<String>>,
) -> CorsBuilder<SetAllowOrigins<S>>where
S::AllowOrigins: IsUnset,
Sourcepub fn max_age(self, value: i32) -> CorsBuilder<SetMaxAge<S>>where
S::MaxAge: IsUnset,
pub fn max_age(self, value: i32) -> CorsBuilder<SetMaxAge<S>>where
S::MaxAge: IsUnset,
Sourcepub fn maybe_max_age(self, value: Option<i32>) -> CorsBuilder<SetMaxAge<S>>where
S::MaxAge: IsUnset,
pub fn maybe_max_age(self, value: Option<i32>) -> CorsBuilder<SetMaxAge<S>>where
S::MaxAge: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for CorsBuilder<S>
impl<S> RefUnwindSafe for CorsBuilder<S>
impl<S> Send for CorsBuilder<S>
impl<S> Sync for CorsBuilder<S>
impl<S> Unpin for CorsBuilder<S>
impl<S> UnsafeUnpin for CorsBuilder<S>
impl<S> UnwindSafe for CorsBuilder<S>
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> 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 moreCreates a shared type from an unshared type.