scautable

io.github.quafadas.scautable.scautable
object scautable extends PlatformSpecific

This is a simple library to render a scala case class as an html table. It assumes the presence of a HtmlTableRender instance for each type in the case class.

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
scautable.type

Members list

Type members

Classlikes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait HtmlTableRender[A]

Implement this trait for any type you want to render as part of an html table. See the concrete examples below.

Implement this trait for any type you want to render as part of an html table. See the concrete examples below.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[A <: Product](a: Seq[A])(using tableDeriveInstance: HtmlTableRender[A]): TypedTag[String]

Render a sequence of unknown type as an html table

Render a sequence of unknown type as an html table

Value parameters

a

- A sequence of unknown type you wish to render as an html table

addHeader

- If true, add a header row to the table

tableDeriveInstance

- An instance of HtmlTableRender for the type A

Attributes

def apply[A <: Product](a: Seq[A], addHeader: Boolean, h: List[String])(using tableDeriveInstance: HtmlTableRender[A]): TypedTag[String]
def apply[A <: Product](a: A, addHeader: Boolean)(using tableDeriveInstance: HtmlTableRender[A]): TypedTag[String]
inline def nt[K <: Tuple, V <: Tuple](a: Seq[NamedTuple[K, V]])(using tableDeriveInstance: HtmlTableRender[V]): TypedTag[String]

Inherited methods

inline def desktopShow[A <: Product](a: Seq[A])(using tableDeriveInstance: HtmlTableRender[A]): Path

Attempts to open a browser window, and display this Seq of Product as a table.

Attempts to open a browser window, and display this Seq of Product as a table.

Value parameters

a

- seq of case classes

tableDeriveInstance

- summon a HtmlTableRender instance for the case class

Attributes

Inherited from:
PlatformSpecific
inline def desktopShowNt[K <: Tuple, V <: Tuple](a: Seq[NamedTuple[K, V]])(using tableDeriveInstance: HtmlTableRender[V]): Path

Attributes

Inherited from:
PlatformSpecific

Givens

Givens

given booleanT: HtmlTableRender[Boolean]
given doubleT: HtmlTableRender[Double]
given enumT[E <: Enum](using m: SumOf[E]): HtmlTableRender[E]
given intT: HtmlTableRender[Int]
given longT: HtmlTableRender[Long]
given nt[K <: Tuple, N <: Tuple]: HtmlTableRender[NamedTuple[K, N]]
given optT[A](using inner: HtmlTableRender[A]): HtmlTableRender[Option[A]]
given seqT[A](using inner: HtmlTableRender[A]): HtmlTableRender[Seq[A]]
given stringT: HtmlTableRender[String]