pub struct Registry { /* private fields */ }Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
pub fn add_route( &mut self, method: Method, path: impl Into<String>, ) -> Result<(), RouteRegistryError>
pub fn add_route_with_handler<F>( &mut self, method: Method, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn get<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn post<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn put<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn patch<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn delete<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn head<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn options<F>( &mut self, path: impl Into<String>, handler: F, ) -> Result<(), RouteRegistryError>
pub fn routes(&self) -> &[Entry]
pub fn match_request(&self, method: &Method, path: &str) -> Match<'_>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl !UnwindSafe for Registry
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