RoutingRulesF

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

final class Exception(msg: String) extends RuntimeException

Value members

Concrete methods

def bulk[F[_], Page, Props](toPage: Path => Option[Parsed[Page]], fromPage: Page => (Path, ActionF[F, Page, Props]), notFound: Path => Parsed[Page])(implicit F: Sync[F]): RoutingRulesF[F, 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.

def bulkDynamic[F[_], Page, Props](toPage: Path => F[Option[Parsed[Page]]], fromPage: Page => (Path, F[ActionF[F, Page, Props]]), notFound: Path => Parsed[Page])(implicit F: Sync[F]): RoutingRulesF[F, 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.

def fromRule[F[_], Page, Props](rule: RoutingRule[Page, Props], fallbackPath: Page => Path, fallbackAction: (Path, Page) => ActionF[F, Page, Props], whenNotFound: Path => F[Parsed[Page]])(implicit F: Sync[F]): RoutingRulesF[F, Page, Props]