[][src]Struct tsukuyomi_cors::Builder

pub struct Builder { /* fields omitted */ }

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]

pub fn allow_origins<U>(
    self,
    origins: impl IntoIterator<Item = U>
) -> Result<Self> where
    Uri: HttpTryFrom<U>, 
[src]

pub fn allow_method<M>(self, method: M) -> Result<Self> where
    Method: HttpTryFrom<M>, 
[src]

pub fn allow_methods<M>(
    self,
    methods: impl IntoIterator<Item = M>
) -> Result<Self> where
    Method: HttpTryFrom<M>, 
[src]

pub fn allow_header<H>(self, header: H) -> Result<Self> where
    HeaderName: HttpTryFrom<H>, 
[src]

pub fn allow_headers<H>(
    self,
    headers: impl IntoIterator<Item = H>
) -> Result<Self> where
    HeaderName: HttpTryFrom<H>, 
[src]

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

impl Default for Builder[src]

impl Debug for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

impl<T> Erased for T