package rw
- Alphabetic
- By Inheritance
- rw
- CompileRW
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit class Asable extends AnyRef
- trait ClassR[T] extends Reader[T]
- trait ClassRW[T] extends ReaderWriter[T] with ClassR[T] with ClassW[T]
ClassRW provides convenience functionality to simplify class mapping with ReaderWriter
- trait ClassW[T] extends Writer[T]
- trait CompileRW extends AnyRef
- implicit class Convertible[T] extends AnyRef
- trait Reader[T] extends AnyRef
Reader provides a simple T => Value wrapper functionality
- trait ReaderWriter[T] extends Reader[T] with Writer[T]
ReaderWriter provides a single class representation of a Reader and Writer for the same type
- trait Writer[T] extends AnyRef
Writable provides a simple Value => T wrapper functionality
Value Members
- macro def ccR[T]: Reader[T]
- Definition Classes
- CompileRW
- macro def ccRW[T]: ReaderWriter[T]
- Definition Classes
- CompileRW
- macro def ccW[T]: Writer[T]
- Definition Classes
- CompileRW
- def defaultGetType[P](p: P): String
Used by polyRW by default to getType using the class name with the first character lowercase
- def enumRW[T](fieldName: String, mapping: (String, T)*): ReaderWriter[T]
Convenience functionality for working with enumerations
Convenience functionality for working with enumerations
- fieldName
the field name to refer to in the Value
- mapping
a mapping of key/value pairs representing the String in fieldName to the representative value
- def polyRW[P](fieldName: String = "type", getType: (P) => String = defaultGetType)(matcher: PartialFunction[String, ReaderWriter[_ <: P]]): ReaderWriter[P]
Convenience functionality for working with polymorphic types
Convenience functionality for working with polymorphic types
- 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)
- matcher
a matcher for field values to get the representative ReaderWriter for that type
- def staticRW[T](value: T): ReaderWriter[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
the singleton value to use
- object RWMacros
- object Reader
- object ReaderWriter
- object Writer