pub fn add<R>(
        &mut self,
        route: R,
        handler: Handler,
    ) -> Result<(), <R as TryInto<RouteSpec>>::Error>
    where
        R: TryInto<RouteSpec>,
    {
        self.routes.insert(route.try_into()?, handler);
        Ok(())
    }
/// Adds a route to the router, accepting any type that implements TryInto<[`RouteSpec`]>. In most circumstances, this will be a &str or a String.
///
/// ```rust
/// let mut router = routefinder::Router::new();
/// assert!(router.add("*named_wildcard", ()).is_err());
/// assert!(router.add("*", ()).is_ok());
/// assert!(router.add(format!("/dynamic/{}", "route"), ()).is_ok());
/// ```
Adds a route to the router, accepting any type that implements TryInto<[`RouteSpec`]>. In most circumstances, this will be a &str or a String.
Adds a route to the router accepting any type that implements TryInto< [ ` RouteSpec ` ] > . In most circumstances this will be a &str or a String .
pub fn add<R>(
        &mut self,
        route: R,
        handler: Handler,
    ) -> Result<(), <R as TryInto<RouteSpec>>::Error>
    where
        R: TryInto<RouteSpec>,
    {
        self.routes.insert(route.try_into()?, handler);
        Ok(())
    }
pub fn add < R > ( & mut self , route : R , handler : Handler , ) -> Result < ( ) , < R as TryInto < RouteSpec > > :: Error > where R : TryInto < RouteSpec > , { self . routes . insert ( route . try_into ( ) ? , handler ) ; Ok ( ( ) ) }
Adds a route to the router, accepting any type that implements TryInto<[`RouteSpec`]>.
Adds a route to the router accepting any type that implements TryInto< [ ` RouteSpec ` ] > .
&mut self
route
R
handler
Handler