pub struct RouteDispatch {
pub handler_type: &'static str,
pub dispatch: fn(Vec<u8>, HashMap<String, String>, HashMap<String, String>, Option<Box<dyn IClaims>>) -> Pin<Box<dyn Future<Output = Result<ResponseData, Error>> + Send>>,
}Expand description
A dispatch function registered at compile time via the endpoint macros.
Each #[get], #[post], etc. macro generates one of these with a
function that constructs the request, looks up the handler, and
calls through the HandlerCache call bridge.
Fields§
§handler_type: &'static str§dispatch: fn(Vec<u8>, HashMap<String, String>, HashMap<String, String>, Option<Box<dyn IClaims>>) -> Pin<Box<dyn Future<Output = Result<ResponseData, Error>> + Send>>Trait Implementations§
impl Collect for RouteDispatch
Auto Trait Implementations§
impl Freeze 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