pub struct Router<'r, K> { /* private fields */ }Implementations§
Source§impl<'r, K: Eq + Hash + Copy> Router<'r, K>
impl<'r, K: Eq + Hash + Copy> Router<'r, K>
pub fn new() -> Self
pub fn set_maximum_parameter_value_length(&mut self, value: usize) -> &mut Self
pub fn set_parameter_placeholder_re(&mut self, value: &'r Regex) -> &mut Self
pub fn set_parameter_value_encoder( &mut self, value: Box<dyn Fn(&str) -> Cow<'_, str>>, ) -> &mut Self
pub fn set_parameter_value_decoder( &mut self, value: Box<dyn Fn(&str) -> Cow<'_, str>>, ) -> &mut Self
pub fn insert_route(&mut self, route_key: K, template: &'r str) -> &mut Self
pub fn parse_route<'f>( &self, path: &'f str, ) -> (Option<K>, HashMap<&'r str, Cow<'f, str>>)
pub fn stringify_route<'f>(
&self,
route_key: K,
route_parameters: &'f HashMap<&'f str, &'f str>,
) -> Option<Cow<'f, str>>where
'r: 'f,
Trait Implementations§
Auto Trait Implementations§
impl<'r, K> Freeze for Router<'r, K>
impl<'r, K> !RefUnwindSafe for Router<'r, K>
impl<'r, K> !Send for Router<'r, K>
impl<'r, K> !Sync for Router<'r, K>
impl<'r, K> Unpin for Router<'r, K>where
K: Unpin,
impl<'r, K> !UnwindSafe for Router<'r, K>
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