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.
Sourcepub fn name_for<Member: Area>(&mut self, handler: &str) -> &mut Self
pub fn name_for<Member: Area>(&mut self, handler: &str) -> &mut Self
For a library’s route serving Member’s members from this area, as sign-in serves each
member area from Web.
Sourcepub fn throttle(&mut self, rate: Rate) -> &mut Self
pub fn throttle(&mut self, rate: Rate) -> &mut Self
Per principal, or per client address without one.
pub fn signed(&mut self) -> &mut Self
Sourcepub fn feature(&mut self, feature: Feature) -> &mut Self
pub fn feature(&mut self, feature: Feature) -> &mut Self
Not found while feature is off, so a hidden feature is not revealed.
Sourcepub fn entitled(&mut self, entitlement: Entitlement) -> &mut Self
pub fn entitled(&mut self, entitlement: Entitlement) -> &mut Self
Refused with 403 to a principal whose plan does not hold entitlement.
Source§impl<A: Area> ActionRoute<'_, A>
impl<A: Area> ActionRoute<'_, A>
pub fn body_limit(&mut self, bytes: usize) -> &mut Self
Sourcepub fn file_limit(&mut self, bytes: usize) -> &mut Self
pub fn file_limit(&mut self, bytes: usize) -> &mut Self
Each file of a form; the whole body stays within body_limit.
Sourcepub fn idempotent(&mut self) -> &mut Self
pub fn idempotent(&mut self) -> &mut Self
A retry gets the first request’s answer; the action’s effects are written once.
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.