DispatchTrie

cask.internal.DispatchTrie
See theDispatchTrie companion object
case class DispatchTrie[T](current: Option[(T, Boolean)], children: Map[String, DispatchTrie[T]])

A simple Trie that can be compiled from a list of endpoints, to allow endpoint lookup in O(length-of-request-path) time. Lookup returns the T this trie contains, as well as a map of bound wildcards (path segments starting with :) and any remaining un-used path segments (only when current._2 == true, indicating this route allows trailing segments)

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

final def lookup(remainingInput: List[String], bindings: Map[String, String]): Option[(T, Map[String, String], Seq[String])]
def map[V](f: T => V): DispatchTrie[V]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product