Encoder

smithy4s.codecs.Encoder
See theEncoder companion object
trait Encoder[+Out, -A]

An abstraction that codifies the notion of transforming a piece of data into some output.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Encoder[Out, A]

Members list

Value members

Abstract methods

def encode(a: A): Out

Symbolises the action of writing some content A into an output Out.

Symbolises the action of writing some content A into an output Out.

Attributes

Concrete methods

final def andThen[Out0](f: Out => Out0): Encoder[Out0, A]

Transforms the Output type

Transforms the Output type

Attributes

final def contramap[B](f: B => A): Encoder[Out, B]

Contramap the data which this writer works. The writer is a contravariant-functor on A.

Contramap the data which this writer works. The writer is a contravariant-functor on A.

Attributes

def pipeToWriter[Message](writer: Writer[Message, Out]): Writer[Message, A]

Connects this writer's output channel to the data channel of another writer. This is useful for connecting an encoder into a larger writer.

Connects this writer's output channel to the data channel of another writer. This is useful for connecting an encoder into a larger writer.

Attributes