Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
o

FlashKind

object FlashKind

Creates FlashKind values.

Defined by scalive.FlashKind. View source (scalive/api/src/scalive/FlashKind.scala:36-58)

Methods3

apply

def apply(value: String): FlashKind[String]

Creates a flash kind for text, stored as is.

No validation or normalization is performed on value, the exact runtime key.

Defined by scalive.FlashKind.apply. View source (scalive/api/src/scalive/FlashKind.scala:41-42)

json

def json[A](value: String)(using evidence$1: zio.json.JsonCodec[A]): FlashKind[A]

Creates a flash kind for values of type A, stored as JSON.

A stored value that no longer decodes, for example one an earlier deployment encoded, is treated as absent.

Defined by scalive.FlashKind.json. View source (scalive/api/src/scalive/FlashKind.scala:57-58)

unit

def unit(value: String): FlashKind[Unit]

Creates a flash kind that carries no value, for a message whose text the view knows.

Use it for feedback such as "Saved": ctx.flash.put(kind, ()) shows the message, and the put number that flash(kind)((_, put) => ...) receives tells one put from the next.

Defined by scalive.FlashKind.unit. View source (scalive/api/src/scalive/FlashKind.scala:49-50)