pub struct Routes<A: Area> { /* private fields */ }Expand description
Handlers are plain async fns whose arguments all resolve in A; a GET’s in its ReadContext.
Implementations§
Source§impl<A: Area> Routes<A>
impl<A: Area> Routes<A>
pub fn post<Args: 'static, H>( &mut self, path: &str, handler: H, ) -> ActionRoute<'_, A>
pub fn put<Args: 'static, H>( &mut self, path: &str, handler: H, ) -> ActionRoute<'_, A>
pub fn patch<Args: 'static, H>( &mut self, path: &str, handler: H, ) -> ActionRoute<'_, A>
pub fn delete<Args: 'static, H>( &mut self, path: &str, handler: H, ) -> ActionRoute<'_, A>
Sourcepub fn get<Args: 'static, H: Loader<A, Args>>(
&mut self,
path: &str,
loader: H,
) -> PageRoute<'_, A>
pub fn get<Args: 'static, H: Loader<A, Args>>( &mut self, path: &str, loader: H, ) -> PageRoute<'_, A>
Also answers HEAD.
pub fn screen<Args: 'static, H: Loader<A, Args>>( &mut self, path: &str, name: &str, loader: H, ) -> PageRoute<'_, A>
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Routes<A>
impl<A> !UnwindSafe for Routes<A>
impl<A> Freeze for Routes<A>
impl<A> Send for Routes<A>
impl<A> Sync for Routes<A>
impl<A> Unpin for Routes<A>
impl<A> UnsafeUnpin for Routes<A>
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