io.worxbend.tui.macros

Members list

Type members

Classlikes

trait ActionHandler[A]

Handles an application action value. Bound at compile time via bindAction — never through runtime reflection.

Handles an application action value. Bound at compile time via bindAction — never through runtime reflection.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object ActionHandler

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Field[A](spec: FieldSpec, parse: String => Either[String, A])

A form field with parsing and validation, composing cue4s-style: transforms are stored lazily and run when the field's raw input is submitted.

A form field with parsing and validation, composing cue4s-style: transforms are stored lazily and run when the field's raw input is submitted.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Field

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Field.type
enum FieldInput

What kind of input control a form field needs — derived from the field's type.

What kind of input control a form field needs — derived from the field's type.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FieldSpec(name: String, input: FieldInput)

One field of a derived form: the case-class field name and its input kind.

One field of a derived form: the case-class field name and its input kind.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FormSpec[A](fields: Seq[FieldSpec], assemble: Seq[Any] => A)

A compile-time-derived description of a form for A: the fields to render and how to assemble the submitted values back into an A. Produced by deriveForm; owned by tui-macros so tui-dsl can consume it without a circular dependency.

A compile-time-derived description of a form for A: the fields to render and how to assemble the submitted values back into an A. Produced by deriveForm; owned by tui-macros so tui-dsl can consume it without a circular dependency.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

inline def bindAction[A](inline handler: A => Unit): ActionHandler[A]

Binds a handler function to an action type at compile time. The inline keeps the dispatch a direct call in the generated code — no lookup table, no reflective invocation.

Binds a handler function to an action type at compile time. The inline keeps the dispatch a direct call in the generated code — no lookup table, no reflective invocation.

Attributes

inline def deriveForm[A](using m: ProductOf[A]): FormSpec[A]

Derives a FormSpec for a case class at compile time via Mirror.ProductOf — field names become field specs, field types choose the input kind (String → text, Int → int, Boolean → bool). Unsupported field types are a compile error, not a runtime surprise. No runtime reflection anywhere.

Derives a FormSpec for a case class at compile time via Mirror.ProductOf — field names become field specs, field types choose the input kind (String → text, Int → int, Boolean → bool). Unsupported field types are a compile error, not a runtime surprise. No runtime reflection anywhere.

Attributes