pub enum RequestMiddlewareAction {
Proceed {
should_continue_on_invalid_cors: bool,
request: Request<Body>,
},
Respond {
should_validate_hosts: bool,
response: Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send>>,
},
}
Expand description
Action undertaken by a middleware.
Variants§
Proceed
Fields
Proceed with standard RPC handling
Respond
Fields
Intercept the request and respond differently.
Trait Implementations§
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more