Enum jsonrpc_http_server::RequestMiddlewareAction [] [src]

pub enum RequestMiddlewareAction {
    Proceed {
        should_continue_on_invalid_cors: bool,
    },
    Respond {
        should_validate_hosts: bool,
        handler: BoxFuture<Response, Error>,
    },
}

Action undertaken by a middleware.

Variants

Proceed with standard RPC handling

Fields of Proceed

Should the request be processed even if invalid CORS headers are detected? This allows for side effects to take place.

Intercept the request and respond differently.

Fields of Respond

Should standard hosts validation be performed?

hyper handler used to process the request

Trait Implementations

impl From<Option<Response>> for RequestMiddlewareAction
[src]

Performs the conversion.

impl<T> From<Option<T>> for RequestMiddlewareAction where
    T: IntoFuture<Item = Response, Error = Error>,
    T::Future: Send + 'static, 
[src]

Performs the conversion.