Packages

  • package root
    Definition Classes
    root
  • package lol

    This is the documentation for the lolhttp library.

    This is the documentation for the lolhttp library.

    • http is the core module providing HTTP Client and Server.
    • json is an optional module providing integration with the circe JSON library.
    • html is an optional module providing HTML templating.
    Definition Classes
    root
  • package html

    HTML templating.

    HTML templating.

    val items: List[Item] = ???
    val content: Html = tmpl"""
      <­h1>Items<­/h1>
      @if(items.isEmpty) {
        <­em>No results<­/em>
      }
      else {
        <­ul>
           @items.map { item =>
             <li>@item.name</li>
           }
    
      }
    """

    Html values can also be easily created from the html interpolation. Conversion from Scala values is done via the ToHtml type class.

    val content: Html = html"""Hello $${name}!"""

    They will be encoded as lol.http.Content thanks to Html.encoder.

    Definition Classes
    lol
  • Html
  • HtmlInterpolation
  • SeqHtmlExtensions
  • SeqHtmlExtensions0
  • TemplateInterpolation
  • ToHtml

object ToHtml

Default instances for the ToHtml type class.

Source
html.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ToHtml
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[A](f: (A) ⇒ Html): ToHtml[A]

    Creates an instance of ToHtml using the provided function.

  5. implicit def arrayToHtml[A](implicit arg0: ToHtml[A]): ToHtml[Array[A]]

    Join all elements rendering.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. implicit val booleanToHtml: ToHtml[Boolean]

    toString.

  8. implicit val charToHtml: ToHtml[Char]

    toString.

  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. implicit val doubleToHtml: ToHtml[Double]

    toString.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. implicit val floatToHtml: ToHtml[Float]

    toString.

  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. implicit val htmlToHtml: ToHtml[Html]

    Identity function.

  18. implicit val intToHtml: ToHtml[Int]

    toString.

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. implicit def listToHtml[A](implicit arg0: ToHtml[A]): ToHtml[List[A]]

    Join all elements rendering.

  21. implicit val longToHtml: ToHtml[Long]

    toString.

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. implicit val noneToHtml: ToHtml[None.type]

    Empty.

  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. implicit def optionToHtml[A](implicit arg0: ToHtml[A]): ToHtml[Option[A]]

    Encode the content if available or empty.

  27. implicit def seqToHtml[A](implicit arg0: ToHtml[A]): ToHtml[Seq[A]]

    Join all elements rendering.

  28. implicit def setToHtml[A](implicit arg0: ToHtml[A]): ToHtml[Set[A]]

    Join all elements rendering.

  29. implicit def someToHtml[A](implicit arg0: ToHtml[A]): ToHtml[Some[A]]

    Encode the content.

  30. implicit val stringToHtml: ToHtml[String]

    Encode string with safe escape of < characters.

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. implicit val unitToHtml: ToHtml[Unit]

    Empty,

  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped