internal/props

Types

pub type PageObject {
  PageObject(
    component: String,
    url: String,
    props: List(PageProp),
    errors: List(PageProp),
    defers: List(PageProp),
    version: String,
    clear_history: option.Option(Bool),
  )
}

Constructors

pub type PageProp {
  ErrorProp(name: String, value: json.Json)
  BaseProp(name: String, value: json.Json)
  OnceProp(name: String, value: fn() -> json.Json)
  SharedProp(name: String, value: json.Json)
  DeferProp(
    name: String,
    value: fn() -> Result(json.Json, Nil),
    group: option.Option(String),
  )
}

Constructors

pub type RenderContext {
  RenderContext(
    component: String,
    version: String,
    first_load: Bool,
    partials: List(String),
    excepts: List(String),
  )
}

Constructors

  • RenderContext(
      component: String,
      version: String,
      first_load: Bool,
      partials: List(String),
      excepts: List(String),
    )

Values

pub fn page_object_to_json(
  po: PageObject,
  ctx: RenderContext,
) -> json.Json
Search Document