Struct tsukuyomi_cors::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder of CORS
.
Implementations
sourceimpl Builder
impl Builder
pub fn allow_origin<U>(self, origin: U) -> Result<Self>where
Uri: HttpTryFrom<U>,
pub fn allow_origins<U>(
self,
origins: impl IntoIterator<Item = U>
) -> Result<Self>where
Uri: HttpTryFrom<U>,
pub fn allow_method<M>(self, method: M) -> Result<Self>where
Method: HttpTryFrom<M>,
pub fn allow_methods<M>(
self,
methods: impl IntoIterator<Item = M>
) -> Result<Self>where
Method: HttpTryFrom<M>,
pub fn allow_header<H>(self, header: H) -> Result<Self>where
HeaderName: HttpTryFrom<H>,
pub fn allow_headers<H>(
self,
headers: impl IntoIterator<Item = H>
) -> Result<Self>where
HeaderName: HttpTryFrom<H>,
pub fn allow_credentials(self, enabled: bool) -> Self
pub fn max_age(self, max_age: Duration) -> Self
pub fn build(self) -> CORS
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more