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]
- Alphabetic
- By Inheritance
- PathCodec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++[B](that: PathCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
- final def /[Env](routes: Routes[Env, Response])(implicit ev: <:<[PathCodec[A], PathCodec[Unit]]): Routes[Env, Response]
- final def /[B](that: PathCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ??(doc: Doc): PathCodec[A]
Attaches documentation to the path codec, which may be used when generating developer docs for a route.
- final def annotate(metaData: MetaData[A]): PathCodec[A]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asType[B](implicit ev: =:=[A, B]): PathCodec[B]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def decode(path: Path): Either[String, A]
Decodes a method and path into a value of type
A. - def doc: Doc
Returns the documentation for the path codec, if any.
- final def encode(value: A): Either[String, Path]
Encodes a value of type
Ainto the method and path that this route pattern would successfully match against. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def example(name: String, example: A): PathCodec[A]
- final def examples(examples: (String, A)*): PathCodec[A]
- final def format(value: A): Either[String, Path]
Formats a value of type
Ainto a path.Formats a value of type
Ainto a path. This is useful for embedding paths into HTML that is rendered by the server. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def render: String
Renders the path codec as a string.
- def segments: Chunk[SegmentCodec[_]]
Returns the segments of the path codec.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- PathCodec → AnyRef → Any
- final def transform[A2](f: (A) => A2)(g: (A2) => A): PathCodec[A2]
- final def transformOrFail[A2](f: (A) => Either[String, A2])(g: (A2) => Either[String, A]): PathCodec[A2]
- final def transformOrFailLeft[A2](f: (A) => Either[String, A2])(g: (A2) => A): PathCodec[A2]
- final def transformOrFailRight[A2](f: (A) => A2)(g: (A2) => Either[String, A]): PathCodec[A2]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])