Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

LiveLayoutKey

class LiveLayoutKey[A](name: String)

Names a value that a LiveView passes to its layouts, and the type of that value.

A layout declares the keys it reads, usually in its companion object, and reads each with layoutValue. A LiveView provides values for them from its model with layoutValues, as in LiveLayoutValues(AppLayout.Heading := "Project scalive").

Keys are compared by identity, not by name, so keys declared by different layouts never clash. The key is invariant in A, so a value of another type cannot be provided for it.

Parameters

name

A label for the key in test output. It does not identify the key.

Type parameters

A

the type of the value

Defined by scalive.LiveLayoutKey. View source (scalive/api/src/scalive/routing/LiveLayoutValues.scala:17-21)

Methods1

:=

def :=(value: A): LiveLayoutValues.Entry

Pairs this key with the value a LiveView provides for it.

Defined by scalive.LiveLayoutKey.:=. View source (scalive/api/src/scalive/routing/LiveLayoutValues.scala:19-19)

Values1

name

val name: String

A label for the key in test output. It does not identify the key.

Defined by scalive.LiveLayoutKey.name. View source (scalive/api/src/scalive/routing/LiveLayoutValues.scala:17-17)