NamedTupleDecomposition

scala.NamedTupleDecomposition

Separate from NamedTuple object so that we can match on the opaque type NamedTuple.

Attributes

Source
NamedTuple.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Types

type DropNames[NT <: AnyNamedTuple] = NT match { case NamedTuple[_$4, x] => x }

The value types of a named tuple represented as a regular tuple.

The value types of a named tuple represented as a regular tuple.

Attributes

Source
NamedTuple.scala
type Names[X <: AnyNamedTuple] = X match { case NamedTuple[n, _$3] => n }

The names of a named tuple, represented as a tuple of literal string values.

The names of a named tuple, represented as a tuple of literal string values.

Attributes

Source
NamedTuple.scala

Extensions

Extensions

extension [N <: Tuple, V <: Tuple](x: NamedTuple[N, V])
inline def ++[N2 <: Tuple, V2 <: Tuple](that: NamedTuple[N2, V2])(using Disjoint[N, N2] =:= true): Concat[NamedTuple[N, V], NamedTuple[N2, V2]]

The tuple consisting of all elements of this tuple followed by all elements of tuple that. The names of the two tuples must be disjoint.

The tuple consisting of all elements of this tuple followed by all elements of tuple that. The names of the two tuples must be disjoint.

Type parameters

N2

the tuple of name types of the other named tuple

V2

the tuple of value types of the other named tuple

Value parameters

that

the named tuple to append to this one

Attributes

Source
NamedTuple.scala
inline def apply(n: Int): Elem[NamedTuple[N, V], n.type]

The value (without the name) at index n of this tuple.

The value (without the name) at index n of this tuple.

Value parameters

n

the zero-based index of the element to retrieve

Attributes

Source
NamedTuple.scala
inline def drop(n: Int): Drop[NamedTuple[N, V], n.type]

The tuple consisting of all elements of this tuple except the first n ones, or no elements if n exceeds size.

The tuple consisting of all elements of this tuple except the first n ones, or no elements if n exceeds size.

Value parameters

n

the number of elements to drop from the beginning of this tuple

Attributes

Source
NamedTuple.scala
inline def head: Head[NamedTuple[N, V]]

The first element value of this tuple.

The first element value of this tuple.

Attributes

Source
NamedTuple.scala
inline def init: Init[NamedTuple[N, V]]

The tuple consisting of all elements of this tuple except the last one.

The tuple consisting of all elements of this tuple except the last one.

Attributes

Source
NamedTuple.scala
inline def last: Last[NamedTuple[N, V]]

The last element value of this tuple.

The last element value of this tuple.

Attributes

Source
NamedTuple.scala
inline def map[F[_]](f: [t] => t => F[t]): Map[NamedTuple[N, V], F]

The named tuple consisting of all element values of this tuple mapped by the polymorphic mapping function f. The names of elements are preserved. If x = (n1 = v1, ..., ni = vi) then x.map(f) =(n1 = f(v1), ..., ni = f(vi))`.

The named tuple consisting of all element values of this tuple mapped by the polymorphic mapping function f. The names of elements are preserved. If x = (n1 = v1, ..., ni = vi) then x.map(f) =(n1 = f(v1), ..., ni = f(vi))`.

Type parameters

F

the type constructor applied to each element value type

Attributes

Source
NamedTuple.scala
inline def reverse: Reverse[NamedTuple[N, V]]

The named tuple consisting of all elements of this tuple in reverse.

The named tuple consisting of all elements of this tuple in reverse.

Attributes

Source
NamedTuple.scala
inline def size: Size[NamedTuple[N, V]]

The number of elements in this tuple.

The number of elements in this tuple.

Attributes

Source
NamedTuple.scala
inline def splitAt(n: Int): Split[NamedTuple[N, V], n.type]

The tuple (x.take(n), x.drop(n)).

The tuple (x.take(n), x.drop(n)).

Value parameters

n

the index at which to split this tuple

Attributes

Source
NamedTuple.scala
inline def tail: Tail[NamedTuple[N, V]]

The tuple consisting of all elements of this tuple except the first one.

The tuple consisting of all elements of this tuple except the first one.

Attributes

Source
NamedTuple.scala
inline def take(n: Int): Take[NamedTuple[N, V], n.type]

The tuple consisting of the first n elements of this tuple, or all elements if n exceeds size.

The tuple consisting of the first n elements of this tuple, or all elements if n exceeds size.

Value parameters

n

the number of elements to take from this tuple

Attributes

Source
NamedTuple.scala
inline def toArray: Array[Object]

An array consisting of all element values.

An array consisting of all element values.

Attributes

Source
NamedTuple.scala
inline def toIArray: IArray[Object]

An immutable array consisting of all element values.

An immutable array consisting of all element values.

Attributes

Source
NamedTuple.scala
inline def toList: List[Union[V]]

A list consisting of all element values.

A list consisting of all element values.

Attributes

Source
NamedTuple.scala
inline def toSeqMap: SeqMap[String, Union[V]]

An immutable map consisting of all element values preserving the order of fields. Keys are the names of the elements.

An immutable map consisting of all element values preserving the order of fields. Keys are the names of the elements.

Attributes

Source
NamedTuple.scala
inline def zip[V2 <: Tuple](that: NamedTuple[N, V2]): Zip[NamedTuple[N, V], NamedTuple[N, V2]]

The named tuple consisting of all element values of this tuple zipped with corresponding element values in named tuple that. If the two tuples have different sizes, the extra elements of the larger tuple will be disregarded. The names of x and that at the same index must be the same. The result tuple keeps the same names as the operand tuples.

The named tuple consisting of all element values of this tuple zipped with corresponding element values in named tuple that. If the two tuples have different sizes, the extra elements of the larger tuple will be disregarded. The names of x and that at the same index must be the same. The result tuple keeps the same names as the operand tuples.

Type parameters

V2

the tuple of value types of the other named tuple

Value parameters

that

the named tuple to zip with this one

Attributes

Source
NamedTuple.scala