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]
def consoleFormat_(table: Seq[Product], fancy: Boolean): String
def consoleFormat_(table: Seq[Product], fancy: Boolean, headers: List[String]): String
def makeFancy(s: String, i: Int): Str
inline def nt[K <: Tuple, V <: Tuple](a: Seq[NamedTuple[K, V]])(using tableDeriveInstance: HtmlTableRender[V]): TypedTag[String]
def printlnConsole_(table: Seq[Product], fancy: Boolean): Unit

Inherited methods

With scaladoc

With scaladoc

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]

Extensions

Extensions

extension (s: Seq[Product])
def consoleFormat(fancy: Boolean): String
def consoleFormat: String