Single

final case class Single[A](schema: Schema[A])
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

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.

Value members

Concrete methods

def decodeFromBody(body: Body, codec: Codec): 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.

def encodeToBody(value: A, codec: Codec): Body

Encodes the A to a body in the given codec.

Encodes the A to a body in the given codec.

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.

Inherited from:
BodyCodec (hidden)
Inherited from:
Product