RouteB

japgolly.scalajs.react.extra.router.StaticDsl$.RouteB
See theRouteB companion object
class RouteB[A](val regex: String, val matchGroups: Int, val parse: (Int => String) => Option[A], val build: A => String) extends RouteCommon[RouteB, A], ForRouteB[A]

A fragment of a route. Can be composed with other fragments.

Value parameters

matchGroups

The number of matches that regex will capture.

Attributes

Companion
object
Graph
Supertypes
trait ForRouteB[A]
trait RouteCommon[RouteB, A]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def /[B](next: RouteB[B])(implicit c: Composition[A, B]): RouteB[C]
def option: RouteB[Option[A]]
override def parseThen(f: Option[A] => Option[A]): RouteB[A]

Attributes

Definition Classes
override def pmap[B](b: A => Option[B])(a: B => A): RouteB[B]

Prism map.

Prism map.

Some values of A can be turned into a Bs, some fail (in which case the route is considered non-matching).

All Bs can be turned back into As.

Attributes

Definition Classes
final def route: Route[A]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def ~[B](next: RouteB[B])(implicit c: Composition[A, B]): RouteB[C]

Inherited methods

inline def caseClass[B <: Product](using m: ProductOf[B]): RouteB[B]

Maps the captures values of the route to a case class.

Maps the captures values of the route to a case class.

Attributes

Inherited from:
ForRouteB
inline def caseClassDebug[B <: Product](using m: ProductOf[B]): RouteB[B]

Same as caseClass except the code generated by the macro is printed to stdout.

Same as caseClass except the code generated by the macro is printed to stdout.

Attributes

Inherited from:
ForRouteB
final def const[B](b: B)(implicit ev: ValueOf[A]): R[B]

Attributes

Inherited from:
RouteCommon
final def filter(f: A => Boolean): R[A]

Attributes

Inherited from:
RouteCommon
final def mapInput[B >: A](f: B => A): R[B]

Attributes

Inherited from:
RouteCommon
final def mapParsed[B <: A](f: A => B): R[B]

Attributes

Inherited from:
RouteCommon
final def xmap[B](b: A => B)(a: B => A): R[B]

Exponential map.

Exponential map.

Any A can be turned into a B and vice versa.

Attributes

Inherited from:
RouteCommon

Concrete fields

val build: A => String
val matchGroups: Int
val parse: (Int => String) => Option[A]
val regex: String