Directive

pl.iterators.stir.server.Directive
See theDirective companion object
abstract class Directive[L](implicit val ev: Tuple[L])

Attributes

Companion
object
Source
Directive.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def tapply(f: L => Route): Route

Calls the inner route with a tuple of extracted values of type L.

Calls the inner route with a tuple of extracted values of type L.

tapply is short for "tuple-apply". Usually, you will use the regular apply method instead, which is added by an implicit conversion (see Directive.addDirectiveApply).

Attributes

Source
Directive.scala

Concrete methods

def &(magnet: ConjunctionMagnet[L]): magnet.Out

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Alias for and.

Attributes

Source
Directive.scala
def and(magnet: ConjunctionMagnet[L]): magnet.Out

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Attributes

Source
Directive.scala
def as[A](constructor: ConstructFromTuple[L, A]): Directive1[A]

Converts this directive into one which, instead of a tuple of type L, creates an instance of type A (which is usually a case class).

Converts this directive into one which, instead of a tuple of type L, creates an instance of type A (which is usually a case class).

Attributes

Source
Directive.scala
def or[R >: L](that: Directive[R]): Directive[R]

Joins two directives into one which runs the second directive if the first one rejects.

Joins two directives into one which runs the second directive if the first one rejects.

Attributes

Source
Directive.scala
def recover[R >: L : Tuple](recovery: (Seq[Rejection]) => Directive[R]): Directive[R]

Creates a new directive that is able to recover from rejections that were produced by this Directive before the inner route was applied.

Creates a new directive that is able to recover from rejections that were produced by this Directive before the inner route was applied.

Attributes

Source
Directive.scala
def recoverPF[R >: L : Tuple](recovery: PartialFunction[Seq[Rejection], Directive[R]]): Directive[R]

Variant of recover that only recovers from rejections handled by the given PartialFunction.

Variant of recover that only recovers from rejections handled by the given PartialFunction.

Attributes

Source
Directive.scala
def tcollect[R](pf: PartialFunction[L, R], rejections: Rejection*)(implicit tupler: Tupler[R]): Directive[tupler.Out]

If the given scala.PartialFunction is defined for the input, maps this directive with the given function, which can produce either a tuple or any other value. If it is not defined however, the returned directive will reject with the given rejections.

If the given scala.PartialFunction is defined for the input, maps this directive with the given function, which can produce either a tuple or any other value. If it is not defined however, the returned directive will reject with the given rejections.

Attributes

Source
Directive.scala
def tfilter(predicate: L => Boolean, rejections: Rejection*): Directive[L]

Creates a new directive of the same type, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Creates a new directive of the same type, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Attributes

Source
Directive.scala
def tflatMap[R : Tuple](f: L => Directive[R]): Directive[R]

Flatmaps this directive using the given function.

Flatmaps this directive using the given function.

Attributes

Source
Directive.scala
def tmap[R](f: L => R)(implicit tupler: Tupler[R]): Directive[tupler.Out]

Maps over this directive using the given function, which can produce either a tuple or any other value (which will then we wrapped into a scala.Tuple1).

Maps over this directive using the given function, which can produce either a tuple or any other value (which will then we wrapped into a scala.Tuple1).

Attributes

Source
Directive.scala
def trequire(predicate: L => Boolean, rejections: Rejection*): Directive0

Creates a new Directive0, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Creates a new Directive0, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Attributes

Source
Directive.scala
def |[R >: L](that: Directive[R]): Directive[R]

Joins two directives into one which runs the second directive if the first one rejects.

Joins two directives into one which runs the second directive if the first one rejects.

Alias for or.

Attributes

Source
Directive.scala

Implicits

Implicits

implicit val ev: Tuple[L]

Attributes

Source
Directive.scala