pub struct WebRouter { /* private fields */ }Expand description
Web 路由:收集所有已注册的 WebRoute,并按方法与路径查找。
Implementations§
Source§impl WebRouter
impl WebRouter
pub fn new(wrapper: Option<WebRouteWrapper>) -> Self
Sourcepub async fn invoke(
&self,
web_context: WebContext,
axum_context: AxumContext,
) -> Result<WebResponse>
pub async fn invoke( &self, web_context: WebContext, axum_context: AxumContext, ) -> Result<WebResponse>
执行当前请求:注入上下文、查找路由、交由包装器运行。
Auto Trait Implementations§
impl !RefUnwindSafe for WebRouter
impl !UnwindSafe for WebRouter
impl Freeze for WebRouter
impl Send for WebRouter
impl Sync for WebRouter
impl Unpin for WebRouter
impl UnsafeUnpin for WebRouter
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