Packages

final case class Atom[Page, Props](parse: (Path) => Option[Parsed[Page]], path: (Page) => Option[Path], action: (Path, Page) => Option[Action[Page]]) extends RoutingRule[Page, Props] with Product with Serializable

parse

Attempt to parse a given path.

path

Attempt to determine the path for some page.

action

Attempt to determine the action when a route resolves to some page.

Linear Supertypes
Serializable, Product, Equals, RoutingRule[Page, Props], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Atom
  2. Serializable
  3. Product
  4. Equals
  5. RoutingRule
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Atom(parse: (Path) => Option[Parsed[Page]], path: (Page) => Option[Path], action: (Path, Page) => Option[Action[Page]])

    parse

    Attempt to parse a given path.

    path

    Attempt to determine the path for some page.

    action

    Attempt to determine the action when a route resolves to some page.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val action: (Path, Page) => Option[Action[Page]]
  5. final def addCondition(condition: (Page) => CallbackTo[Boolean]): RoutingRule[Page, Props]

    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.

    condition

    Function that takes the requested page and returns true if the page should be rendered.

    Definition Classes
    RoutingRule
  6. final def addCondition(condition: CallbackTo[Boolean]): RoutingRule[Page, Props]

    Prevent this rule from functioning unless some condition holds.

    Prevent this rule from functioning unless some condition holds.

    condition

    Callback that requested page and returns true if the page should be rendered.

    Definition Classes
    RoutingRule
  7. final def addConditionWithFallback(condition: (Page) => CallbackTo[Boolean], fallback: Action[Page]): RoutingRule[Page, Props]

    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. When the condition doesn't hold, a fallback action is performed.

    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.

    Definition Classes
    RoutingRule
  8. final def addConditionWithFallback(condition: CallbackTo[Boolean], fallback: Action[Page]): RoutingRule[Page, Props]

    Prevent this rule from functioning unless some condition holds.

    Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, a fallback action is performed.

    condition

    Callback that requested page and returns true if the page should be rendered.

    fallback

    Response when rule matches but condition doesn't hold.

    Definition Classes
    RoutingRule
  9. final def addConditionWithOptionalFallback(condition: (Page) => CallbackTo[Boolean], fallback: Option[Action[Page]]): RoutingRule[Page, Props]

    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. When the condition doesn't hold, an optional fallback action may be performed.

    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.

    Definition Classes
    RoutingRule
  10. final def addConditionWithOptionalFallback(condition: CallbackTo[Boolean], fallback: Option[Action[Page]]): RoutingRule[Page, Props]

    Prevent this rule from functioning unless some condition holds.

    Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.

    condition

    Callback 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.

    Definition Classes
    RoutingRule
  11. final def addConditionWithOptionalFallback(condition: (Page) => CallbackTo[Boolean], fallback: (Page) => Option[Action[Page]]): RoutingRule[Page, Props]

    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. When the condition doesn't hold, an optional fallback action may be performed.

    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.

    Definition Classes
    RoutingRule
  12. final def addConditionWithOptionalFallback(condition: CallbackTo[Boolean], fallback: (Page) => Option[Action[Page]]): RoutingRule[Page, Props]

    Prevent this rule from functioning unless some condition holds.

    Prevent this rule from functioning unless some condition holds. When the condition doesn't hold, an optional fallback action may be performed.

    condition

    Callback 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.

    Definition Classes
    RoutingRule
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. final def autoCorrect(redirectVia: SetRouteVia): RoutingRule[Page, Props]

    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.

    Definition Classes
    RoutingRule
  15. final def autoCorrect: RoutingRule[Page, Props]

    See autoCorrect().

    See autoCorrect().

    Definition Classes
    RoutingRule
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def fallback(fallbackPath: (Page) => Path, fallbackAction: (Path, Page) => Action[Page]): WithFallback[Page, Props]

    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.

    Definition Classes
    RoutingRule
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def modPath(onCreate: (Path) => Path, onParse: (Path) => Option[Path]): RoutingRule[Page, Props]

    Modify the path(es) generated and parsed by this rule.

    Modify the path(es) generated and parsed by this rule.

    onCreate

    Modify paths when generating for a route.

    onParse

    When parsing a path, transform and optionally reject it.

    Definition Classes
    AtomRoutingRule
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def noFallback: WithFallback[Page, Props]

    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 Pages in sync - compiler proof of Page exhaustiveness is sacrificed.

    It is recommended that you call RouterConfig.verify as a sanity-check.

    Definition Classes
    RoutingRule
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. val parse: (Path) => Option[Parsed[Page]]
  27. val path: (Page) => Option[Path]
  28. final def pmap[W](f: (Page) => W)(pf: PartialFunction[W, Page]): RoutingRule[W, Props]
    Definition Classes
    RoutingRule
  29. final def pmapCT[W](f: (Page) => W)(implicit ct: ClassTag[Page]): RoutingRule[W, Props]
    Definition Classes
    RoutingRule
  30. def pmapF[W](f: (Page) => W)(g: (W) => Option[Page]): RoutingRule[W, Props]
    Definition Classes
    AtomRoutingRule
  31. final def prefixPath(prefix: String): RoutingRule[Page, Props]

    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.

    Definition Classes
    RoutingRule
  32. final def prefixPath_/(prefix: String): RoutingRule[Page, Props]

    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.

    Definition Classes
    RoutingRule
  33. def productElementNames: Iterator[String]
    Definition Classes
    Product
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def widen[W >: Page](pf: PartialFunction[W, Page]): RoutingRule[W, Props]
    Definition Classes
    RoutingRule
  39. final def widenCT[W >: Page](implicit ct: ClassTag[Page]): RoutingRule[W, Props]
    Definition Classes
    RoutingRule
  40. final def widenF[W >: Page](f: (W) => Option[Page]): RoutingRule[W, Props]
    Definition Classes
    RoutingRule
  41. def xmap[A](f: (Page) => A)(g: (A) => Page): RoutingRule[A, Props]
    Definition Classes
    AtomRoutingRule
  42. final def |(that: RoutingRule[Page, Props]): RoutingRule[Page, Props]

    Compose rules.

    Compose rules.

    Definition Classes
    RoutingRule

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from RoutingRule[Page, Props]

Inherited from AnyRef

Inherited from Any

Ungrouped