ContextEncoder

org.typelevel.catapult.ContextEncoder
See theContextEncoder companion object
trait ContextEncoder[Ctx]

A typeclass for converting values of type Ctx into LDContext. An instance must be in scope when evaulating flags against a context represented by the Ctx type. Instances are provided for LDContext and LDUser; custom instances can be created to allow other types to be used.

Attributes

Companion
object
Source
ContextEncoder.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def encode(ctx: Ctx): LDContext

Attributes

Source
ContextEncoder.scala

Concrete methods

def contramap[A](f: A => Ctx): ContextEncoder[A]

Create a new ContextEncoder by applying a function to the input before encoding.

Create a new ContextEncoder by applying a function to the input before encoding.

Attributes

Source
ContextEncoder.scala