pub struct RouteDispatch {
pub handler_type: &'static str,
pub dispatch: fn(&mut dyn IHttpContext) -> Pin<Box<dyn Future<Output = Result<Box<dyn IActionResult>, Error>> + Send + '_>>,
}Expand description
A dispatch function registered at compile time via the endpoint macros.
The function receives the live request context, so it can inspect headers,
stream the body as multipart/form-data, and produce any
Response — including streamed file downloads.
Fields§
§handler_type: &'static str§dispatch: fn(&mut dyn IHttpContext) -> Pin<Box<dyn Future<Output = Result<Box<dyn IActionResult>, Error>> + Send + '_>>Trait Implementations§
impl Collect for RouteDispatch
Auto Trait Implementations§
impl Forget for RouteDispatch
impl Freeze for RouteDispatch
impl Move for RouteDispatch
impl RefUnwindSafe for RouteDispatch
impl Send for RouteDispatch
impl Sync for RouteDispatch
impl Unpin for RouteDispatch
impl UnsafeUnpin for RouteDispatch
impl UnwindSafe for RouteDispatch
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