pub struct RouteMatcher { /* private fields */ }Expand description
Route matcher for webhook routes
Implementations§
Source§impl RouteMatcher
impl RouteMatcher
Sourcepub fn new(routes: &[WebhookRoute]) -> Self
pub fn new(routes: &[WebhookRoute]) -> Self
Create a new route matcher from webhook routes
Sourcepub fn match_route<'a>(
&self,
path: &str,
method: &HttpMethod,
routes: &'a [WebhookRoute],
) -> Option<RouteMatch<'a>>
pub fn match_route<'a>( &self, path: &str, method: &HttpMethod, routes: &'a [WebhookRoute], ) -> Option<RouteMatch<'a>>
Match an incoming request against configured routes
Auto Trait Implementations§
impl Freeze for RouteMatcher
impl RefUnwindSafe for RouteMatcher
impl Send for RouteMatcher
impl Sync for RouteMatcher
impl Unpin for RouteMatcher
impl UnsafeUnpin for RouteMatcher
impl UnwindSafe for RouteMatcher
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