[−][src]Struct tsukuyomi_cors::Builder
A builder of CORS
.
Methods
impl Builder
[src]
pub fn new() -> Self
[src]
Creates a Builder
with the default configuration.
pub fn allow_origin<U>(self, origin: U) -> Result<Self> where
Uri: HttpTryFrom<U>,
[src]
Uri: HttpTryFrom<U>,
pub fn allow_origins<U>(
self,
origins: impl IntoIterator<Item = U>
) -> Result<Self> where
Uri: HttpTryFrom<U>,
[src]
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>,
[src]
Method: HttpTryFrom<M>,
pub fn allow_methods<M>(
self,
methods: impl IntoIterator<Item = M>
) -> Result<Self> where
Method: HttpTryFrom<M>,
[src]
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>,
[src]
HeaderName: HttpTryFrom<H>,
pub fn allow_headers<H>(
self,
headers: impl IntoIterator<Item = H>
) -> Result<Self> where
HeaderName: HttpTryFrom<H>,
[src]
self,
headers: impl IntoIterator<Item = H>
) -> Result<Self> where
HeaderName: HttpTryFrom<H>,
pub fn allow_credentials(self, enabled: bool) -> Self
[src]
pub fn max_age(self, max_age: Duration) -> Self
[src]
pub fn build(self) -> CORS
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,