RW

fabric.rw.RW
See theRW companion trait
object RW extends CompileRW

Attributes

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

Members list

Value members

Concrete methods

def enumeration[T](list: List[T], asString: T => String, caseSensitive: Boolean): RW[T]

Attributes

Source
RW.scala
def from[T](r: T => Json, w: Json => T, d: => DefType): RW[T]

Attributes

Source
RW.scala
def poly[P](fieldName: String, getType: P => String)(types: (String, RW[_ <: P])*): RW[P]

Convenience functionality for working with polymorphic types

Convenience functionality for working with polymorphic types

Value parameters

fieldName

the field name stored in the value (defaults to "type")

getType

a function to determine the field value from an instance (defaults to the class name with the first character lowercase - defaultGetType)

types

a list of tuples with the type names associated with their RW

Attributes

Source
RW.scala
def static[T](className: String, value: T): RW[T]

Convenience functionality to provide a static / singleton value that represents that type

Convenience functionality to provide a static / singleton value that represents that type

Value parameters

value

the singleton value to use

Attributes

Source
RW.scala
def string[T](asString: T => String, fromString: String => T): RW[T]

Attributes

Source
RW.scala
def wrapped[T](key: String, asJson: T => Json, fromJson: Json => T, definition: DefType): RW[T]

Attributes

Source
RW.scala

Inherited methods

final inline def derived[T <: Product](using inline T: ProductOf[T], ct: ClassTag[T]): RW[T]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def fromMap[T <: Product](map: Map[String, Json])(using p: ProductOf[T]): T

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def fromMapElems[A <: Product, T <: Tuple, L <: Tuple](map: Map[String, Json], index: Int, arr: Array[Any], defaults: Map[String, Any]): Unit

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def gen[T <: Product](using ProductOf[T], ClassTag[T]): RW[T]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def genR[T <: Product](using ProductOf[T]): Reader[T]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def genW[T <: Product](using ProductOf[T]): Writer[T]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def getClassName[T]: String

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def getDefaultParams[T]: Map[String, AnyRef]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def toClassName[T](using ct: ClassTag[T]): Option[String]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def toDefinition[T <: Product](using p: ProductOf[T], ct: ClassTag[T]): DefType

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def toDefinitionElems[A <: Product, T <: Tuple, L <: Tuple](index: Int): Map[String, DefType]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def toMap[T <: Product](t: T)(using p: ProductOf[T]): Map[String, Json]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala
inline def toMapElems[A <: Product, T <: Tuple, L <: Tuple](a: A, index: Int): Map[String, Json]

Attributes

Inherited from:
CompileRW
Source
CompileRW.scala