pub struct ActionRoute<'r, A: Area> { /* private fields */ }Implementations§
Source§impl<'r, A: Area> ActionRoute<'r, A>
impl<'r, A: Area> ActionRoute<'r, A>
Sourcepub fn name(&mut self, handler: &str) -> &mut Self
pub fn name(&mut self, handler: &str) -> &mut Self
For a library’s route: named module.area.handler like those sofie gen names.
Source§impl<A: Area> ActionRoute<'_, A>
impl<A: Area> ActionRoute<'_, A>
pub fn body_limit(&mut self, bytes: usize) -> &mut Self
Sourcepub fn then_screen(&mut self, name: &str, fragment: &str)
pub fn then_screen(&mut self, name: &str, fragment: &str)
JSON callers still get the action’s reply.
Sourcepub fn then_redirect(&mut self, location: &str)
pub fn then_redirect(&mut self, location: &str)
JSON callers still get the action’s reply. Each {name} in location is the route’s
path parameter of that name, or else the reply’s field: "/orders/{id}" after an action
replying the order it created, "/shops/{shop}/orders" after /shops/{shop}/orders/new.
Sourcepub fn then_follow(&mut self)
pub fn then_follow(&mut self)
A browser goes to the https:// location the action replies; JSON callers get the reply.
Sourcepub fn then_redirect_or_follow(&mut self, location: &str)
pub fn then_redirect_or_follow(&mut self, location: &str)
As then_redirect, next included, unless the action replies a location of this
app, such as a second step of signing in, which the browser then goes to instead.
Auto Trait Implementations§
impl<'r, A> !RefUnwindSafe for ActionRoute<'r, A>
impl<'r, A> !UnwindSafe for ActionRoute<'r, A>
impl<'r, A> Freeze for ActionRoute<'r, A>
impl<'r, A> Send for ActionRoute<'r, A>
impl<'r, A> Sync for ActionRoute<'r, A>
impl<'r, A> Unpin for ActionRoute<'r, A>
impl<'r, A> UnsafeUnpin for ActionRoute<'r, 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