com.github.tarao.record4s

Members list

Type members

Classlikes

abstract class % extends Record, Selectable

Base class for records.

Base class for records.

Example

val r = %(name = "tarao", age = 3)
// val r: com.github.tarao.record4s.%{val name: String; val age: Int} = %(name = tarao, age = 3)
r.name
// val res0: String = tarao
r.age
// val res1: Int = 3

Attributes

Source
Record.scala
Supertypes
trait Selectable
trait Record
class Object
trait Matchable
class Any
Known subtypes
class MapRecord
abstract class ArrayRecord[R] extends ProductRecord, Dynamic

Record class with constant-time field access.

Record class with constant-time field access.

It provides extensible records in a different way than %. There are following differences compared to %.

  • Field access is faster (constant time)
  • Creation is faster
  • Update time grows significantly when record size grows
  • Compilation is a bit slower
  • No implicit upcast

Example

val r = ArrayRecord(name = "tarao", age = 3)
// val r: com.github.tarao.record4s.ArrayRecord[(("name", String), ("age", Int))] = ArrayRecord(name = tarao, age = 3)
r.name
// val res0: String = tarao
r.age
// val res1: Int = 3

Attributes

Companion
object
Source
ArrayRecord.scala
Supertypes
trait Dynamic
trait Product
trait Equals
trait Record
class Object
trait Matchable
class Any
Show all
Known subtypes
class VectorRecord
object ArrayRecord extends Extensible[EmptyTuple], ArrayRecordPlatformSpecific

Attributes

Companion
class
Source
ArrayRecord.scala
Supertypes
trait Extensible[EmptyTuple]
trait Dynamic
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Source
ArrayRecordMacros.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Source
PlatformSpecific.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ArrayRecord
trait Converter[From, To]

Attributes

Companion
object
Source
Converter.scala
Supertypes
class Object
trait Matchable
class Any
object Converter

Attributes

Companion
trait
Source
Converter.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Converter.type
object Macros

Attributes

Source
Macros.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Macros.type
final class MapRecord extends %

A concrete record class.

A concrete record class.

This class is exposed due to inlining but not intended to be used directly.

Attributes

Source
Record.scala
Supertypes
class %
trait Selectable
trait Record
class Object
trait Matchable
class Any
Show all
abstract class ProductRecord extends Record, Product

Base record class compatible with Product.

Base record class compatible with Product.

Attributes

Companion
object
Source
ArrayRecord.scala
Supertypes
trait Product
trait Equals
trait Record
class Object
trait Matchable
class Any
Show all
Known subtypes
class ArrayRecord[R]
class VectorRecord
object ProductRecord

Attributes

Companion
class
Source
ArrayRecord.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait Record

Base trait for record types.

Base trait for record types.

This trait is a placeholder to avoid trouble with defining methods on companion object of %.

Attributes

Companion
object
Source
Record.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class %
class MapRecord
class ArrayRecord[R]
class VectorRecord

Attributes

Companion
trait
Source
Record.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Record.type
trait RecordLike[R]

Attributes

Companion
object
Source
RecordLike.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class RecordLikeRecord[R]
class OfProduct[P, ElemLabels0, ElemTypes0]
class OfTuple[T]
object RecordLike

Attributes

Companion
trait
Source
RecordLike.scala
Supertypes
class Object
trait Matchable
class Any
Self type
RecordLike.type

Attributes

Source
PlatformSpecific.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Record
final class Selector[T <: Tuple](val labels: Seq[String]) extends Dynamic

Attributes

Companion
object
Source
Selector.scala
Supertypes
trait Dynamic
class Object
trait Matchable
class Any
object Selector

Attributes

Companion
class
Source
Selector.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Selector.type
final class Unselector[T <: Tuple] extends Dynamic

Attributes

Companion
object
Source
Selector.scala
Supertypes
trait Dynamic
class Object
trait Matchable
class Any
object Unselector

Attributes

Companion
class
Source
Selector.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Unselector.type
final class VectorRecord extends ArrayRecord[EmptyTuple]

A concrete record class.

A concrete record class.

This class is exposed due to inlining but not intended to be used directly.

Attributes

Source
ArrayRecord.scala
Supertypes
class ArrayRecord[EmptyTuple]
trait Dynamic
trait Product
trait Equals
trait Record
class Object
trait Matchable
class Any
Show all

Types

opaque type Tag[T]

Type tags that only have meaning statically.

Type tags that only have meaning statically.

Attributes

Source
Tag.scala

Value members

Concrete fields

val %: Extensible[%]

Attributes

Source
Record.scala
val select: Selector[EmptyTuple]

Attributes

Source
Selector.scala
val unselect: Unselector[EmptyTuple]

Attributes

Source
Selector.scala