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
Abstract Value Members
Concrete 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 /[B](segment: SegmentCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
Returns a new pattern that is extended with the specified segment pattern.
- final def /[B](that: PathCodec[B])(implicit combiner: Combiner[A, B]): PathCodec[Out]
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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]) @native() @IntrinsicCandidate()
- final def decode(path: Path): Either[String, A]
Decodes a method and path into a value of type
A. - 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 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
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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])