RoutingRules

class Object
trait Matchable
class Any

Type members

Types

Value members

Concrete methods

@inline
def bulk[Page, Props](toPage: Path => Option[Parsed[Page]], fromPage: Page => (Path, Action[Page, Props]), notFound: Path => Parsed[Page]): RoutingRules[Page, Props]

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

The trade-off here is that care will need to be taken to ensure that path-parsing aligns with paths generated for pages. It is recommended that you call RouterConfig.verify as a sanity-check.

@inline
def bulkDynamic[Page, Props](toPage: Path => Function0[Option[Parsed[Page]]], fromPage: Page => (Path, Function0[Action[Page, Props]]), notFound: Path => Parsed[Page]): RoutingRules[Page, Props]

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

The trade-off here is that care will need to be taken to ensure that path-parsing aligns with paths generated for pages. It is recommended that you call RouterConfig.verify as a sanity-check.

@inline
def fromRule[Page, Props](rule: RoutingRule[Page, Props], fallbackPath: Page => Path, fallbackAction: (Path, Page) => Action[Page, Props], whenNotFound: Path => Function0[Parsed[Page]]): RoutingRules[Page, Props]