pub struct ServeMux { /* private fields */ }Expand description
HTTP request multiplexer. Port of Go’s http.ServeMux.
Matching rules (same as Go):
- Exact match wins over prefix match.
- Among prefix matches, the longest pattern wins.
- Patterns ending with
/are subtree patterns (prefix match). - Patterns not ending with
/are exact match only.
Implementations§
Trait Implementations§
Source§impl Handler for ServeMux
impl Handler for ServeMux
fn serve_http(&self, w: &mut dyn ResponseWriter, r: &Request)
Auto Trait Implementations§
impl !Freeze for ServeMux
impl RefUnwindSafe for ServeMux
impl Send for ServeMux
impl Sync for ServeMux
impl Unpin for ServeMux
impl UnsafeUnpin for ServeMux
impl UnwindSafe for ServeMux
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