pub enum RequestMiddlewareAction {
Proceed {
should_continue_on_invalid_cors: bool,
request: Request<Body>,
},
Respond {
should_validate_hosts: bool,
response: Box<dyn Future<Item = Response<Body>, Error = Error> + Send>,
},
}
Expand description
Action undertaken by a middleware.
Variants
Proceed
Fields
should_continue_on_invalid_cors: bool
Should the request be processed even if invalid CORS headers are detected? This allows for side effects to take place.
Proceed with standard RPC handling
Respond
Fields
should_validate_hosts: bool
Should standard hosts validation be performed?
Intercept the request and respond differently.
Trait Implementations
sourceimpl From<Request<Body>> for RequestMiddlewareAction
impl From<Request<Body>> for RequestMiddlewareAction
sourceimpl From<Response<Body>> for RequestMiddlewareAction
impl From<Response<Body>> for RequestMiddlewareAction
Auto Trait Implementations
impl !RefUnwindSafe for RequestMiddlewareAction
impl Send for RequestMiddlewareAction
impl !Sync for RequestMiddlewareAction
impl Unpin for RequestMiddlewareAction
impl !UnwindSafe for RequestMiddlewareAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more