Or
Value members
Inherited methods
Prevent this rule from functioning unless some condition holds.
Prevent this rule from functioning unless some condition holds.
- Value parameters:
- condition
Sync[Unit] that requested page and returns true if the page should be rendered.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context.
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context.
- Value parameters:
- condition
Function that takes the requested page and returns true if the page should be rendered.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, a fallback action is performed.
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, a fallback action is performed.
- Value parameters:
- condition
Sync[Unit] that requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, a fallback action is performed.
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, a fallback action is performed.
- Value parameters:
- condition
Function that takes the requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.
- Value parameters:
- condition
Sync[Unit] that requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold. If response is
None
it will be as if this rule doesn't exist and will likely end in the route-not-found fallback behaviour.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.
Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.
- Value parameters:
- condition
Sync[Unit] that requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold. If response is
None
it will be as if this rule doesn't exist and will likely end in the route-not-found fallback behaviour.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, an optional fallback action may be performed.
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, an optional fallback action may be performed.
- Value parameters:
- condition
Function that takes the requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold. If response is
None
it will be as if this rule doesn't exist and will likely end in the route-not-found fallback behaviour.
- Inherited from:
- RoutingRule
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, an optional fallback action may be performed.
Prevent this rule from functioning unless some condition holds, passes in the page requested as part of the context. When the condition doesn't hold, an optional fallback action may be performed.
- Value parameters:
- condition
Function that takes the requested page and returns true if the page should be rendered.
- fallback
Response when rule matches but condition doesn't hold. If response is
None
it will be as if this rule doesn't exist and will likely end in the route-not-found fallback behaviour.
- Inherited from:
- RoutingRule
When a route matches a page, compare its Path to what the route would generate for the same page and if they differ, redirect to the generated one.
When a route matches a page, compare its Path to what the route would generate for the same page and if they differ, redirect to the generated one.
Example: If a route matches /issue/dev-23
and returns a Page("DEV", 23)
for which the generate path would be
/issue/DEV-23
, this would automatically redirect /issue/dev-23
to /issue/DEV-23
, and process
/issue/DEV-23
normally using its associated action.
- Inherited from:
- RoutingRule
Specify behaviour when a Page
doesn't have an associated Path
or Action
.
Specify behaviour when a Page
doesn't have an associated Path
or Action
.
- Inherited from:
- RoutingRule
When a Page
doesn't have an associated Path
or Action
, throw a runtime error.
When a Page
doesn't have an associated Path
or Action
, throw a runtime error.
This is the trade-off for keeping the parsing and generation of known Page
s in sync - compiler proof of
Page
exhaustiveness is sacrificed.
It is recommended that you call RouterConfig.verify as a sanity-check.
- Inherited from:
- RoutingRule
Add a prefix to the path(es) generated and parsed by this rule.
Add a prefix to the path(es) generated and parsed by this rule.
- Inherited from:
- RoutingRule
Add a prefix to the path(es) generated and parsed by this rule.
Add a prefix to the path(es) generated and parsed by this rule.
Unlike prefixPath when the suffix is non-empty, a slash is added between prefix and suffix.
- Inherited from:
- RoutingRule