SchemaLike

oxygen.schema.SchemaLike
See theSchemaLike companion object
trait SchemaLike[A]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait JsonSchema[A]
trait NonProductLike[A]
class ASTSchema[A]
class ArraySchema[A]
object BooleanSchema
class IntNumberSchema[A]
class NumberSchema[A]
class OptionalSchema[A]
class StringSchema[A]
class Transform[A, B]
class TransformOrFail[A, B]
trait ProductLike[A]
trait ProductSchema[A]
trait SumSchema[A]
class TransformProduct[A, B]
trait PlainTextSchema[A]
class EnumSchema[A]
object StringSchema
class Transform[A, B]
class TransformOrFail[A, B]
Show all
Self type

Members list

Type members

Classlikes

object unsafe

There are times when you only care about encoding or decoding, and not the other. This makes that possible. If you try to do the thing you explicitly decided not to implement, you will get a runtime exception.

There are times when you only care about encoding or decoding, and not the other. This makes that possible. If you try to do the thing you explicitly decided not to implement, you will get a runtime exception.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
unsafe.type

Types

type S[a] <: SchemaLike[a]

Value members

Abstract methods

def decode(string: String): Either[String, A]
def encode(value: A): String
def transform[B](ab: A => B, ba: B => A)(using newTypeTag: TypeTag[B]): S[B]
def transformOrFail[B](ab: A => Either[String, B], ba: B => A)(using newTypeTag: TypeTag[B]): S[B]

Concrete methods

final def transformAttempt[B](ab: A => B, ba: B => A)(using newTypeTag: TypeTag[B]): S[B]
final def transformAttemptObscure[B](ab: A => B, ba: B => A)(using newTypeTag: TypeTag[B]): S[B]
final def transformOption[B](ab: A => Option[B], ba: B => A)(using newTypeTag: TypeTag[B]): S[B]
final def transformOptionObscure[B](ab: A => Option[B], ba: B => A)(using newTypeTag: TypeTag[B]): S[B]

Abstract fields

val typeTag: TypeTag[A]