akka.http.scaladsl.server

Directive

abstract class Directive[L] extends AnyRef

A directive that provides a tuple of values of type L to create an inner route.

Source
Directive.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Directive
  2. AnyRef
  3. Any
Implicitly
  1. by SingleValueModifiers
  2. by addByNameNullaryApply
  3. by addDirectiveApply
  4. by any2stringadd
  5. by any2stringfmt
  6. by any2ArrowAssoc
  7. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Directive()(implicit ev: Tuple[L])

Abstract Value Members

  1. abstract def tapply(f: (L) ⇒ (RequestContext) ⇒ Future[RouteResult]): (RequestContext) ⇒ Future[RouteResult]

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

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def &(magnet: ConjunctionMagnet[L]): Out

    Joins two directives into one which extracts the concatenation of its base directive extractions.

    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.

  5. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Directive[L] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  6. def ->[B](y: B): (Directive[L], B)

    Implicit information
    This member is added by an implicit conversion from Directive[L] to ArrowAssoc[Directive[L]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. def apply(v1: ⇒ (RequestContext) ⇒ Future[RouteResult]): (RequestContext) ⇒ Future[RouteResult]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addByNameNullaryApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is Unit (L =:= Unit).
    Definition Classes
    Function1
  10. def apply(v1: In): (RequestContext) ⇒ Future[RouteResult]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (In) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addDirectiveApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is context-bounded by akka.http.scaladsl.server.util.ApplyConverter (L: ApplyConverter).
    Definition Classes
    Function1
  11. 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).

  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compose[A](g: (A) ⇒ ⇒ (RequestContext) ⇒ Future[RouteResult]): (A) ⇒ (RequestContext) ⇒ Future[RouteResult]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addByNameNullaryApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is Unit (L =:= Unit).
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  15. def compose[A](g: (A) ⇒ In): (A) ⇒ (RequestContext) ⇒ Future[RouteResult]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (In) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addDirectiveApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is context-bounded by akka.http.scaladsl.server.util.ApplyConverter (L: ApplyConverter).
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  16. def ensuring(cond: (Directive[L]) ⇒ Boolean, msg: ⇒ Any): Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to Ensuring[Directive[L]] performed by method any2Ensuring in scala.Predef. This conversion will take place only if L is a superclass of Any and a subclass of Unit with (Nothing) (L >: Any <: Unit with (Nothing)).
    Definition Classes
    Ensuring
  17. def ensuring(cond: (Directive[L]) ⇒ Boolean): Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to Ensuring[Directive[L]] performed by method any2Ensuring in scala.Predef. This conversion will take place only if L is a superclass of Any and a subclass of Unit with (Nothing) (L >: Any <: Unit with (Nothing)).
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: ⇒ Any): Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to Ensuring[Directive[L]] performed by method any2Ensuring in scala.Predef. This conversion will take place only if L is a superclass of Any and a subclass of Unit with (Nothing) (L >: Any <: Unit with (Nothing)).
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to Ensuring[Directive[L]] performed by method any2Ensuring in scala.Predef. This conversion will take place only if L is a superclass of Any and a subclass of Unit with (Nothing) (L >: Any <: Unit with (Nothing)).
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  22. implicit val ev: Tuple[L]

  23. def filter(predicate: (T) ⇒ Boolean, rejections: Rejection*): Directive1[T]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to SingleValueModifiers[T] performed by method SingleValueModifiers in akka.http.scaladsl.server.Directive. This conversion will take place only if L is (T) (L =:= (T)).
    Definition Classes
    SingleValueModifiers
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def flatMap[R](f: (T) ⇒ Directive[R])(implicit arg0: Tuple[R]): Directive[R]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to SingleValueModifiers[T] performed by method SingleValueModifiers in akka.http.scaladsl.server.Directive. This conversion will take place only if L is (T) (L =:= (T)).
    Definition Classes
    SingleValueModifiers
  26. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Directive[L] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  27. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. def map[R](f: (T) ⇒ R)(implicit tupler: Tupler[R]): Directive[Out]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to SingleValueModifiers[T] performed by method SingleValueModifiers in akka.http.scaladsl.server.Directive. This conversion will take place only if L is (T) (L =:= (T)).
    Definition Classes
    SingleValueModifiers
  31. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. def recover[R >: L](recovery: (Seq[Rejection]) ⇒ Directive[R])(implicit arg0: Tuple[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**.

  35. def recoverPF[R >: L](recovery: PartialFunction[Seq[Rejection], Directive[R]])(implicit arg0: Tuple[R]): Directive[R]

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

  36. def require(predicate: (T) ⇒ Boolean, rejections: Rejection*): Directive0

    Implicit information
    This member is added by an implicit conversion from Directive[L] to SingleValueModifiers[T] performed by method SingleValueModifiers in akka.http.scaladsl.server.Directive. This conversion will take place only if L is (T) (L =:= (T)).
    Definition Classes
    SingleValueModifiers
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. 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.

  39. def tflatMap[R](f: (L) ⇒ Directive[R])(implicit arg0: Tuple[R]): Directive[R]

    Flatmaps this directive using the given function.

  40. def tmap[R](f: (L) ⇒ R)(implicit tupler: Tupler[R]): Directive[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 Tuple1).

  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. 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.

  43. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def |[R >: L](that: Directive[R]): Directive[R]

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

  47. def [B](y: B): (Directive[L], B)

    Implicit information
    This member is added by an implicit conversion from Directive[L] to ArrowAssoc[Directive[L]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def andThen[A](g: ((RequestContext) ⇒ Future[RouteResult]) ⇒ A): (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ A

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addByNameNullaryApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is Unit (L =:= Unit).
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult]).andThen(g)
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  2. def andThen[A](g: ((RequestContext) ⇒ Future[RouteResult]) ⇒ A): (In) ⇒ A

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (In) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addDirectiveApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is context-bounded by akka.http.scaladsl.server.util.ApplyConverter (L: ApplyConverter).
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: (In) ⇒ (RequestContext) ⇒ Future[RouteResult]).andThen(g)
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  3. val self: Any

    Implicit information
    This member is added by an implicit conversion from Directive[L] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: StringAdd).self
    Definition Classes
    StringAdd
  4. val self: Any

    Implicit information
    This member is added by an implicit conversion from Directive[L] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: StringFormat).self
    Definition Classes
    StringFormat
  5. def toString(): String

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addByNameNullaryApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is Unit (L =:= Unit).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (directive: (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult]).toString()
    Definition Classes
    Function1 → AnyRef → Any
  6. def toString(): String

    Implicit information
    This member is added by an implicit conversion from Directive[L] to (In) ⇒ (RequestContext) ⇒ Future[RouteResult] performed by method addDirectiveApply in akka.http.scaladsl.server.Directive. This conversion will take place only if L is context-bounded by akka.http.scaladsl.server.util.ApplyConverter (L: ApplyConverter).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (directive: (In) ⇒ (RequestContext) ⇒ Future[RouteResult]).toString()
    Definition Classes
    Function1 → AnyRef → Any

Deprecated Value Members

  1. def x: Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to ArrowAssoc[Directive[L]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: ArrowAssoc[Directive[L]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Directive[L]

    Implicit information
    This member is added by an implicit conversion from Directive[L] to Ensuring[Directive[L]] performed by method any2Ensuring in scala.Predef. This conversion will take place only if L is a superclass of Any and a subclass of Unit with (Nothing) (L >: Any <: Unit with (Nothing)).
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (directive: Ensuring[Directive[L]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion SingleValueModifiers from Directive[L] to SingleValueModifiers[T]

Inherited by implicit conversion addByNameNullaryApply from Directive[L] to (⇒ (RequestContext) ⇒ Future[RouteResult]) ⇒ (RequestContext) ⇒ Future[RouteResult]

Inherited by implicit conversion addDirectiveApply from Directive[L] to (In) ⇒ (RequestContext) ⇒ Future[RouteResult]

Inherited by implicit conversion any2stringadd from Directive[L] to StringAdd

Inherited by implicit conversion any2stringfmt from Directive[L] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Directive[L] to ArrowAssoc[Directive[L]]

Inherited by implicit conversion any2Ensuring from Directive[L] to Ensuring[Directive[L]]

Ungrouped