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
Proceed with standard RPC handling
Fields
Respond
Intercept the request and respond differently.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestMiddlewareAction
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