DelegatingCodecAPI

smithy4s.http.CodecAPI$.DelegatingCodecAPI
abstract class DelegatingCodecAPI extends CodecAPI

Attributes

Graph
Supertypes
trait CodecAPI
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

type Codec[A] = Codec[A]

Inherited types

type Cache

Attributes

Inherited from:
CodecAPI

Value members

Concrete methods

Decodes partial data from a byte array

Decodes partial data from a byte array

Attributes

bytes

an byte array

codec

the implementation-specific codec type

Returns:

either a PayloadError, or the partial data, which can be combined with partial data coming from the metadata.

def decodeFromByteBufferPartial[A](codec: Codec[A], bytes: ByteBuffer): Either[PayloadError, BodyPartial[A]]

Decodes partial data from a byte buffer, returning a function that is able to reconstruct the full data, provided a map resulting from the decoding of the metadata.

Decodes partial data from a byte buffer, returning a function that is able to reconstruct the full data, provided a map resulting from the decoding of the metadata.

Attributes

bytes

a bytue buffer

codec

the implementation-specific codec

Returns:

either a PayloadError, or the partial data, which can be combined with partial data coming from the metadata.

def mediaType[A](codec: Codec[A]): HttpMediaType
def writeToArray[A](codec: Codec[A], value: A): Array[Byte]

Writes data to a byte array. Field values bound to http metadata (path/query/headers) must be eluded.

Writes data to a byte array. Field values bound to http metadata (path/query/headers) must be eluded.

Attributes

codec

the implementation-specific codec

value

the value to encode

Inherited methods

def compileCodec[A](schema: Schema[A], cache: Cache): Codec[A]

Turns a Schema into this API's preferred representation.

Turns a Schema into this API's preferred representation.

Attributes

cache

a Cache that can be used to optimise the compilation of Schemas into Codecs.

schema

the value's schema

Returns:

the codec associated to the A value.

Inherited from:
CodecAPI
final def compileCodec[A](schema: Schema[A]): Codec[A]

Turns a Schema into this API's preferred representation.

Turns a Schema into this API's preferred representation.

Attributes

schema

the value's schema

Returns:

the codec associated to the A value.

Inherited from:
CodecAPI

Attributes

Inherited from:
CodecAPI
def decodeFromByteArray[A](codec: Codec[A], bytes: Array[Byte]): Either[PayloadError, A]

Attributes

Inherited from:
CodecAPI
def decodeFromByteBuffer[A](codec: Codec[A], bytes: ByteBuffer): Either[PayloadError, A]

Attributes

Inherited from:
CodecAPI