GenericDeserializer

fs2.kafka.GenericDeserializer
See theGenericDeserializer companion class

Attributes

Companion
class
Source
Deserializer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, A]

Attributes

Source
Deserializer.scala
def apply[F[_]](implicit F: Sync[F]): Deserializer[F, Array[Byte]]

Alias for Deserializer#identity.

Alias for Deserializer#identity.

Attributes

Source
Deserializer.scala
def const[F[_], A](a: A)(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer which deserializes all bytes to the specified value of type A.

Creates a new Deserializer which deserializes all bytes to the specified value of type A.

Attributes

Source
Deserializer.scala
def delegate[F[_], A](deserializer: Deserializer[A])(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer which delegates deserialization to the specified Kafka Deserializer.

Creates a new Deserializer which delegates deserialization to the specified Kafka Deserializer. Note that the close and configure functions won't be called for the delegate.

It is assumed the delegate deserialize function is pure. If it's not pure, then use suspend after delegate, so the impure behaviours can be captured properly.

Attributes

Source
Deserializer.scala
def fail[F[_], A](e: Throwable)(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer which always fails deserialization with the specified exception e.

Creates a new Deserializer which always fails deserialization with the specified exception e.

Attributes

Source
Deserializer.scala
def failWith[F[_], A](message: String)(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer which always fails deserialization with a DeserializationException using the specified message.

Creates a new Deserializer which always fails deserialization with a DeserializationException using the specified message.

Attributes

Source
Deserializer.scala
def headers[F[_], A](f: Headers => Deserializer[F, A])(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer which can use different Deserializers depending on the record headers.

Creates a new Deserializer which can use different Deserializers depending on the record headers.

Attributes

Source
Deserializer.scala
def instance[F[_], A](f: (String, Headers, Array[Byte]) => F[A])(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer from the specified function.

Creates a new Deserializer from the specified function. Use lift instead if the deserializer doesn't need access to the Kafka topic name or record headers.

Attributes

Source
Deserializer.scala
def lift[F[_], A](f: Array[Byte] => F[A])(implicit F: Sync[F]): Deserializer[F, A]

Creates a new Deserializer from the specified function, ignoring from which Kafka topic the bytes came and any record headers.

Creates a new Deserializer from the specified function, ignoring from which Kafka topic the bytes came and any record headers. Use instance instead if the deserializer needs access to the Kafka topic name or the record headers.

Attributes

Source
Deserializer.scala
def string[F[_]](charset: Charset)(implicit F: Sync[F]): Deserializer[F, String]

Creates a new Deserializer which deserializes String values using the specified Charset.

Creates a new Deserializer which deserializes String values using the specified Charset. Note that the default String deserializer uses UTF-8.

Attributes

Source
Deserializer.scala
def topic[T <: KeyOrValue, F[_], A](f: PartialFunction[String, GenericDeserializer[T, F, A]])(implicit F: Sync[F]): GenericDeserializer[T, F, A]

Creates a new Deserializer which can use different Deserializers depending on the Kafka topic name from which the serialized bytes came.

Creates a new Deserializer which can use different Deserializers depending on the Kafka topic name from which the serialized bytes came.

Attributes

Source
Deserializer.scala
def uuid[F[_]](charset: Charset)(implicit F: Sync[F]): Deserializer[F, UUID]

Creates a new Deserializer which deserializes String values using the specified Charset as UUIDs.

Creates a new Deserializer which deserializes String values using the specified Charset as UUIDs. Note that the default UUID deserializer uses UTF-8.

Attributes

Source
Deserializer.scala

Implicits

Implicits

implicit def attempt[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, Either[Throwable, A]]

The attempt Deserializer try to deserialize to type A, When it fails returns Left containing the exception, otherwise returns Right with the value A

The attempt Deserializer try to deserialize to type A, When it fails returns Left containing the exception, otherwise returns Right with the value A

Attributes

Source
Deserializer.scala
implicit def double[F[_]](implicit F: Sync[F]): Deserializer[F, Double]

Attributes

Source
Deserializer.scala
implicit def float[F[_]](implicit F: Sync[F]): Deserializer[F, Float]

Attributes

Source
Deserializer.scala
implicit def identity[F[_]](implicit F: Sync[F]): Deserializer[F, Array[Byte]]

The identity Deserializer, which does not perform any kind of deserialization, simply using the input bytes as the output.

The identity Deserializer, which does not perform any kind of deserialization, simply using the input bytes as the output.

Attributes

Source
Deserializer.scala
implicit def int[F[_]](implicit F: Sync[F]): Deserializer[F, Int]

Attributes

Source
Deserializer.scala
implicit def long[F[_]](implicit F: Sync[F]): Deserializer[F, Long]

Attributes

Source
Deserializer.scala
implicit def monadError[T <: KeyOrValue, F[_]](implicit F: Sync[F]): MonadError[[_] =>> GenericDeserializer[T, F, _$23], Throwable]

Attributes

Source
Deserializer.scala
implicit def option[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, Option[A]]

The option Deserializer returns None when the bytes are null, and otherwise deserializes using the deserializer for the type A, wrapping the result in Some.

The option Deserializer returns None when the bytes are null, and otherwise deserializes using the deserializer for the type A, wrapping the result in Some.

Attributes

Source
Deserializer.scala
implicit def resource[T <: KeyOrValue, F[_], A](implicit des: GenericDeserializer[T, F, A]): Resource[F, GenericDeserializer[T, F, A]]

Attributes

Source
Deserializer.scala
implicit def short[F[_]](implicit F: Sync[F]): Deserializer[F, Short]

Attributes

Source
Deserializer.scala
implicit def string[F[_]](implicit F: Sync[F]): Deserializer[F, String]

Attributes

Source
Deserializer.scala
implicit def unit[F[_]](implicit F: Sync[F]): Deserializer[F, Unit]

Attributes

Source
Deserializer.scala
implicit def uuid[F[_]](implicit F: Sync[F]): Deserializer[F, UUID]

Attributes

Source
Deserializer.scala