Field

smithy4s.schema.Field
See theField companion object
sealed abstract class Field[F[_], S, A]

Represents a member of product type (case class)

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

type T

Value members

Abstract methods

def contramap[S0](f: S0 => S): Field[F, S0, A]
def fold[B](folder: Folder[F, S, B]): B

Fold a field into a value independant of the type indexed by the field.

Fold a field into a value independant of the type indexed by the field.

Attributes

def foldK[G[_]](folder: FolderK[F, S, G]): G[A]

Fold a field into a value tied to the type indexed by the field.

Fold a field into a value tied to the type indexed by the field.

Attributes

def foreachT(s: S)(f: T => Unit): Unit

Applies a side-effecting thunk on the field's value, unpacking the option in case of an optional field.

Applies a side-effecting thunk on the field's value, unpacking the option in case of an optional field.

Attributes

def get: S => A
def instance: F[T]
def instanceA(onOptional: ToOptional[F]): F[A]

Grabs the instance associated to this field, applying a polymorphic function when the field is optional

Grabs the instance associated to this field, applying a polymorphic function when the field is optional

Attributes

def leftFolder[B](folder: LeftFolder[F, B]): (B, S) => B

Transforms the field into a function that can be applied on the product type, depending on whether it contains the corresponding value.

Transforms the field into a function that can be applied on the product type, depending on whether it contains the corresponding value.

Attributes

def mapK[G[_]](f: PolyFunction[F, G]): Field[G, S, A]

Concrete methods

final def foreachA(s: S)(f: A => Unit): Unit

Applies a side-effecting thunk on the field's value, which will be an option in case of an optional field.

Applies a side-effecting thunk on the field's value, which will be an option in case of an optional field.

Attributes