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>
Sourcepub fn queue<Args: 'static, J: Call<JobContext, Args>>(
&mut self,
path: &str,
job: J,
) -> ActionRoute<'_, A>
pub fn queue<Args: 'static, J: Call<JobContext, Args>>( &mut self, path: &str, job: J, ) -> ActionRoute<'_, A>
Queues job with the input and path parameters, which bind its records as an action’s.
It runs as the requester but reaches every record, so an area whose principals own their
records cannot queue.
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>
Trait Implementations§
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Routes<A>
impl<A> !UnwindSafe for Routes<A>
impl<A> Forget 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