sealed trait PathCodec[A] extends AnyRef

A codec for paths, which consists of segments, where each segment may be a literal, an integer, a long, a string, a UUID, or the trailing path.

import zio.http.endpoint.PathCodec._

val pathCodec = empty / "users" / int("user-id") / "posts" / string("post-id")
Self Type
PathCodec[A]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PathCodec
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ++[B](that: PathCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
  4. final def /[Env](routes: Routes[Env, Response])(implicit ev: <:<[PathCodec[A], PathCodec[Unit]]): Routes[Env, Response]
  5. final def /[B](that: PathCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def ??(doc: Doc): PathCodec[A]

    Attaches documentation to the path codec, which may be used when generating developer docs for a route.

  8. final def annotate(metaData: MetaData[A]): PathCodec[A]
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. final def asType[B](implicit ev: =:=[A, B]): PathCodec[B]
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  12. final def decode(path: Path): Either[String, A]

    Decodes a method and path into a value of type A.

  13. def doc: Doc

    Returns the documentation for the path codec, if any.

  14. final def encode(value: A): Either[String, Path]

    Encodes a value of type A into the method and path that this route pattern would successfully match against.

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. final def example(name: String, example: A): PathCodec[A]
  18. final def examples(examples: (String, A)*): PathCodec[A]
  19. final def format(value: A): Either[String, Path]

    Formats a value of type A into a path.

    Formats a value of type A into a path. This is useful for embedding paths into HTML that is rendered by the server.

  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def matches(path: Path): Boolean

    Determines if this pattern matches the specified method and path.

    Determines if this pattern matches the specified method and path. Rather than use this method, you should just try to decode it directly, for higher performance, otherwise the same information will be decoded twice.

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  27. def render: String

    Renders the path codec as a string.

  28. def segments: Chunk[SegmentCodec[_]]

    Returns the segments of the path codec.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    PathCodec → AnyRef → Any
  31. final def transform[A2](f: (A) => A2)(g: (A2) => A): PathCodec[A2]
  32. final def transformOrFail[A2](f: (A) => Either[String, A2])(g: (A2) => Either[String, A]): PathCodec[A2]
  33. final def transformOrFailLeft[A2](f: (A) => Either[String, A2])(g: (A2) => A): PathCodec[A2]
  34. final def transformOrFailRight[A2](f: (A) => A2)(g: (A2) => Either[String, A]): PathCodec[A2]
  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])

Deprecated Value Members

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

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped