Single

zio.http.api.internal.BodyCodec$.Single
final case class Single[A](schema: Schema[A])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

type Element = A

The element type, described by the schema. This could be the type of the whole request, if it's an RPC-style request with a single, relatively small body, or it could be the type of a single element in a stream.

The element type, described by the schema. This could be the type of the whole request, if it's an RPC-style request with a single, relatively small body, or it could be the type of a single element in a stream.

Attributes

Value members

Concrete methods

def decodeFromBody(body: Body, codec: BinaryCodec[A]): IO[Throwable, A]

Attempts to decode the A from a body using the given codec.

Attempts to decode the A from a body using the given codec.

Attributes

def encodeToBody(value: A, codec: BinaryCodec[A]): Body

Encodes the A to a body in the given codec.

Encodes the A to a body in the given codec.

Attributes

Inherited methods

final def erase: BodyCodec[Any]

Erases the type for easier use in the internal implementation.

Erases the type for easier use in the internal implementation.

Attributes

Inherited from:
BodyCodec (hidden)

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product