Route

object Route
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[Page, Args](encode: Page => Args, decode: Args => Page, pattern: PathSegment[Args, DummyError], basePath: String)(`evidence$1`: ClassTag[Page]): Route[Page, Args]

Create a route with path segments only

Create a route with path segments only

def applyPF[Page, Args](matchEncode: PartialFunction[Any, Args], decode: PartialFunction[Args, Page], pattern: PathSegment[Args, DummyError], basePath: String): Route[Page, Args]

Create a partial route with path segments only

Create a partial route with path segments only

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def onlyFragment[Page, FragmentArgs](encode: Page => FragmentArgs, decode: FragmentArgs => Page, pattern: PathQueryFragmentRepr[Unit, DummyError, Unit, DummyError, FragmentArgs, DummyError], basePath: String)(`evidence$4`: ClassTag[Page]): Route[Page, FragmentArgs]

Create a route with page data encoded in query params only

Create a route with page data encoded in query params only

def onlyFragmentPF[Page, FragmentArgs](matchEncode: PartialFunction[Any, FragmentArgs], decode: PartialFunction[FragmentArgs, Page], pattern: PathQueryFragmentRepr[Unit, DummyError, Unit, DummyError, FragmentArgs, DummyError], basePath: String): Route[Page, FragmentArgs]

Create a partial route with page data encoded in query params only

Create a partial route with page data encoded in query params only

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def onlyQuery[Page, QueryArgs](encode: Page => QueryArgs, decode: QueryArgs => Page, pattern: PathSegmentWithQueryParams[Unit, DummyError, QueryArgs, DummyError], basePath: String)(`evidence$2`: ClassTag[Page]): Route[Page, QueryArgs]

Create a route with page data encoded in query params only

Create a route with page data encoded in query params only

def onlyQueryAndFragment[Page, QueryArgs, FragmentArgs](encode: Page => PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs], decode: PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs] => Page, pattern: PathQueryFragmentRepr[Unit, DummyError, QueryArgs, DummyError, FragmentArgs, DummyError], basePath: String)(`evidence$6`: ClassTag[Page]): Route[Page, PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs]]

Create a route with page data encoded in query params and fragment

Create a route with page data encoded in query params and fragment

def onlyQueryAndFragmentPF[Page, QueryArgs, FragmentArgs](matchEncode: PartialFunction[Any, PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs]], decode: PartialFunction[PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs], Page], pattern: PathQueryFragmentRepr[Unit, DummyError, QueryArgs, DummyError, FragmentArgs, DummyError], basePath: String): Route[Page, PathQueryFragmentMatching[Unit, QueryArgs, FragmentArgs]]

Create a partial route with page data encoded in query params and fragment

Create a partial route with page data encoded in query params and fragment

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def onlyQueryPF[Page, QueryArgs](matchEncode: PartialFunction[Any, QueryArgs], decode: PartialFunction[QueryArgs, Page], pattern: PathSegmentWithQueryParams[Unit, DummyError, QueryArgs, DummyError], basePath: String): Route[Page, QueryArgs]

Create a partial route with page data encoded in query params only

Create a partial route with page data encoded in query params only

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def static[Page](staticPage: Page, pattern: PathSegment[Unit, DummyError], basePath: String): Route[Page, Unit]

Create a route for a static page that does not encode any data in the URL

Create a route for a static page that does not encode any data in the URL

def withFragment[Page, PathArgs, FragmentArgs](encode: Page => PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs], decode: PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs] => Page, pattern: PathQueryFragmentRepr[PathArgs, DummyError, Unit, DummyError, FragmentArgs, DummyError], basePath: String)(`evidence$5`: ClassTag[Page]): Route[Page, PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs]]

Create a route with page data encoded in path segments and fragment

Create a route with page data encoded in path segments and fragment

def withFragmentPF[Page, PathArgs, FragmentArgs](matchEncode: PartialFunction[Any, PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs]], decode: PartialFunction[PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs], Page], pattern: PathQueryFragmentRepr[PathArgs, DummyError, Unit, DummyError, FragmentArgs, DummyError], basePath: String): Route[Page, PathQueryFragmentMatching[PathArgs, Unit, FragmentArgs]]

Create a partial route with page data encoded in path segments and fragment

Create a partial route with page data encoded in path segments and fragment

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def withQuery[Page, PathArgs, QueryArgs](encode: Page => UrlMatching[PathArgs, QueryArgs], decode: UrlMatching[PathArgs, QueryArgs] => Page, pattern: PathSegmentWithQueryParams[PathArgs, DummyError, QueryArgs, DummyError], basePath: String)(`evidence$3`: ClassTag[Page]): Route[Page, UrlMatching[PathArgs, QueryArgs]]

Create a route with page data encoded in path segments and query params

Create a route with page data encoded in path segments and query params

def withQueryAndFragment[Page, PathArgs, QueryArgs, FragmentArgs](encode: Page => PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs], decode: PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs] => Page, pattern: PathQueryFragmentRepr[PathArgs, DummyError, QueryArgs, DummyError, FragmentArgs, DummyError], basePath: String)(`evidence$7`: ClassTag[Page]): Route[Page, PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs]]

Create a route with page data encoded in path segments, query params and fragment

Create a route with page data encoded in path segments, query params and fragment

def withQueryAndFragmentPF[Page, PathArgs, QueryArgs, FragmentArgs](matchEncode: PartialFunction[Any, PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs]], decode: PartialFunction[PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs], Page], pattern: PathQueryFragmentRepr[PathArgs, DummyError, QueryArgs, DummyError, FragmentArgs, DummyError], basePath: String): Route[Page, PathQueryFragmentMatching[PathArgs, QueryArgs, FragmentArgs]]

Create a partial route with page data encoded in path segments, query params and fragment

Create a partial route with page data encoded in path segments, query params and fragment

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.
def withQueryPF[Page, PathArgs, QueryArgs](matchEncode: PartialFunction[Any, UrlMatching[PathArgs, QueryArgs]], decode: PartialFunction[UrlMatching[PathArgs, QueryArgs], Page], pattern: PathSegmentWithQueryParams[PathArgs, DummyError, QueryArgs, DummyError], basePath: String): Route[Page, UrlMatching[PathArgs, QueryArgs]]

Create a partial route with page data encoded in path segments and query params

Create a partial route with page data encoded in path segments and query params

In this version you can match only a subset of the Page type. Make sure that the partiality of matchEncode mirrors that of decode, otherwise you'll have a route that can match a page but can not produce a url for that page (or vice versa).

Value Params
matchEncode
  • convert a Page into args. Any because it can be called with pages of other routes.

Concrete fields

val fragmentBasePath: String

Use this as basePath if you want your route to match /#/foo instead of /foo

Use this as basePath if you want your route to match /#/foo instead of /foo