pub struct RoutingDebugInfo {
pub request_path: String,
pub request_method: String,
pub candidates: Vec<CandidateRoute>,
pub matched_route: Option<String>,
pub extracted_params: ExtractedParams,
pub middleware: Vec<MiddlewareInfo>,
pub routing_time: Option<Duration>,
pub has_partial_matches: bool,
}Expand description
Complete routing debug information.
Fields§
§request_path: StringThe request path being routed.
request_method: StringThe request method.
candidates: Vec<CandidateRoute>All candidate routes that were considered.
matched_route: Option<String>The matched route (if any).
extracted_params: ExtractedParamsExtracted path parameters.
middleware: Vec<MiddlewareInfo>Middleware that will be applied.
routing_time: Option<Duration>Time taken to route (in microseconds).
has_partial_matches: boolWhether any routes partially matched (405 scenario).
Implementations§
Source§impl RoutingDebugInfo
impl RoutingDebugInfo
Sourcepub fn new(path: impl Into<String>, method: impl Into<String>) -> Self
pub fn new(path: impl Into<String>, method: impl Into<String>) -> Self
Create new routing debug info.
Sourcepub fn candidate(self, candidate: CandidateRoute) -> Self
pub fn candidate(self, candidate: CandidateRoute) -> Self
Add a candidate route.
Sourcepub fn params(self, params: ExtractedParams) -> Self
pub fn params(self, params: ExtractedParams) -> Self
Set extracted parameters.
Sourcepub fn middleware(self, mw: MiddlewareInfo) -> Self
pub fn middleware(self, mw: MiddlewareInfo) -> Self
Add middleware info.
Sourcepub fn routing_time(self, duration: Duration) -> Self
pub fn routing_time(self, duration: Duration) -> Self
Set routing time.
Sourcepub fn is_matched(&self) -> bool
pub fn is_matched(&self) -> bool
Check if routing was successful.
Trait Implementations§
Source§impl Clone for RoutingDebugInfo
impl Clone for RoutingDebugInfo
Source§fn clone(&self) -> RoutingDebugInfo
fn clone(&self) -> RoutingDebugInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RoutingDebugInfo
impl RefUnwindSafe for RoutingDebugInfo
impl Send for RoutingDebugInfo
impl Sync for RoutingDebugInfo
impl Unpin for RoutingDebugInfo
impl UnsafeUnpin for RoutingDebugInfo
impl UnwindSafe for RoutingDebugInfo
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