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")
Attributes
- Companion
- object
- Source
- PathCodec.scala
- Graph
-
- Supertypes
- Known subtypes
-
class Annotated[A]
- Self type
-
PathCodec[A]
Members list
Value members
Concrete methods
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attaches documentation to the path codec, which may be used when generating developer docs for a route.
Attaches documentation to the path codec, which may be used when generating developer docs for a route.
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Decodes a method and path into a value of type A.
Returns the documentation for the path codec, if any.
Encodes a value of type A into the method and path that this route pattern would successfully match against.
Encodes a value of type A into the method and path that this route pattern would successfully match against.
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Formats a value of type A into a path. This is useful for embedding paths into HTML that is rendered by the server.
Formats a value of type A into a path. This is useful for embedding paths into HTML that is rendered by the server.
Attributes
- Source
- PathCodec.scala
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.
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.
Attributes
- Source
- PathCodec.scala
Renders the path codec as a string.
Renders the path codec as a string. Surrounds the path variables with the specified prefix and suffix.
Renders the path codec as a string. Surrounds the path variables with the specified prefix and suffix.
Attributes
- Source
- PathCodec.scala
Returns the segments of the path codec.
Converts this PathCodec[Unit] to a Path using the encode method. Useful for round-trip conversion.
Converts this PathCodec[Unit] to a Path using the encode method. Useful for round-trip conversion.
Value parameters
- ev
-
evidence that A =:= Unit
Attributes
- Returns
-
the encoded Path, or Path.root if encoding fails
- Source
- PathCodec.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Attributes
- Source
- PathCodec.scala
Inherited methods
Attributes
- Inherited from:
- PathCodecPlatformSpecific
- Source
- PathCodecPlatformSpecific.scala
Attributes
- Inherited from:
- PathCodecPlatformSpecific
- Source
- PathCodecPlatformSpecific.scala