[][src]Struct simple_proxy::middlewares::cors::Cors

pub struct Cors { /* fields omitted */ }

Methods

impl Cors[src]

pub fn new(
    allow_origin: &'static str,
    allow_methods: &'static str,
    allow_headers: &'static str
) -> Self
[src]

Trait Implementations

impl Middleware for Cors[src]

fn get_name(&self) -> String where
    Self: Sized
[src]

fn set_state(
    &self,
    req_id: u64,
    state: &State,
    data: String
) -> Result<(), MiddlewareError> where
    Self: Sized
[src]

fn state(req_id: u64, state: &State) -> Result<Option<String>, MiddlewareError> where
    Self: Sized
[src]

fn get_state(
    &self,
    req_id: u64,
    state: &State
) -> Result<Option<String>, MiddlewareError> where
    Self: Sized
[src]

fn request_failure(
    &mut self,
    _err: &Error,
    _req_id: u64,
    _state: &State
) -> Result<MiddlewareResult, MiddlewareError>
[src]

fn request_success(
    &mut self,
    _res: &mut Response<Body>,
    _req_id: u64,
    _state: &State
) -> Result<MiddlewareResult, MiddlewareError>
[src]

Auto Trait Implementations

impl Send for Cors

impl Sync for Cors

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
    U: Into<T>, 
[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> Any for T where
    T: 'static + ?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> Erased for T