Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

LiveRouteBuilder

class LiveRouteBuilder[A]

Common operations for an ordinary (non-routed) LiveView route.

Defined by scalive.LiveRouteBuilder. View source (scalive/api/src/scalive/routing/LiveRouting.scala:239-493)

Methods16

->

def ->: [Msg, Model](view: => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Any })

Defined by scalive.LiveRouteBuilder.->. View source (scalive/api/src/scalive/routing/LiveRouting.scala:460-462)

/

def /[B](that: zio.http.codec.PathCodec[B])(using combiner: zio.http.codec.Combiner[A, B]): LiveRouteSeed[combiner.Out]

Defined by scalive.LiveRouteBuilder./. View source (scalive/api/src/scalive/routing/LiveRouting.scala:247-255)

apply

def apply: [Ctx, Msg, Model](factory: (A, zio.http.Request, Ctx) => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Ctx })

Defined by scalive.LiveRouteBuilder.apply. View source (scalive/api/src/scalive/routing/LiveRouting.scala:412-426)

def apply: [Msg, Model](factory: zio.http.Request => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Any })

Defined by scalive.LiveRouteBuilder.apply. View source (scalive/api/src/scalive/routing/LiveRouting.scala:407-410)

def apply: [Msg, Model](view: => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Any })

Defined by scalive.LiveRouteBuilder.apply. View source (scalive/api/src/scalive/routing/LiveRouting.scala:404-405)

context

def context: [Ctx, Msg, Model](factory: Ctx => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Ctx })

Defined by scalive.LiveRouteBuilder.context. View source (scalive/api/src/scalive/routing/LiveRouting.scala:428-431)

def context: [Ctx, Msg, Model](factory: (A, zio.http.Request, Ctx) => LiveView[Msg, Model])(LiveRoute[Any, A] { type Input = Ctx })

Defined by scalive.LiveRouteBuilder.context. View source (scalive/api/src/scalive/routing/LiveRouting.scala:438-441)

def context: [Ctx, R, Msg, Model](factory: (Ctx, R) => LiveView[Msg, Model])(using evidence$1: zio.package.Tag[R])(LiveRoute[R, A] { type Input = Ctx })

Defined by scalive.LiveRouteBuilder.context. View source (scalive/api/src/scalive/routing/LiveRouting.scala:433-436)

def context: [Ctx, R, Msg, Model](factory: (A, zio.http.Request, Ctx, R) => LiveView[Msg, Model])(using evidence$1: zio.package.Tag[R])(LiveRoute[R, A] { type Input = Ctx })

Defined by scalive.LiveRouteBuilder.context. View source (scalive/api/src/scalive/routing/LiveRouting.scala:443-458)

from

def from: [R, Msg, Model](factory: (A, zio.http.Request, R) => LiveView[Msg, Model])(using evidence$1: zio.package.Tag[R])(LiveRoute[R, A] { type Input = Any })

Defined by scalive.LiveRouteBuilder.from. View source (scalive/api/src/scalive/routing/LiveRouting.scala:464-477)

guardConnectedTurns

def guardConnectedTurns[Result <: Unit](guard: Any => zio.IO[LiveConnectedTurnFailure, Result]): LiveRouteBuilder[A]

Appends a policy check before each connected application turn.

Guards at one boundary run in declaration order; session guards run before route guards. The callback receives the context available at this builder. Succeed with Unit to continue, or fail with LiveConnectedTurnFailure for a controlled halt, redirect, reload, or disconnect. Guards are inherited by nested LiveViews and do not run during mount, disconnected rendering, or framework cleanup.

Defined by scalive.LiveRouteBuilder.guardConnectedTurns. View source (scalive/api/src/scalive/routing/LiveRouting.scala:361-370)

location

def location(using ev: =:=[A, Unit]): LiveLocation

Defined by scalive.LiveRouteBuilder.location. View source (scalive/api/src/scalive/routing/LiveRouting.scala:278-279)

def location(value: A): LiveLocation

Defined by scalive.LiveRouteBuilder.location. View source (scalive/api/src/scalive/routing/LiveRouting.scala:272-273)

locationEither

def locationEither(using ev: =:=[A, Unit]): Either[LiveLocation.EncodeError, LiveLocation]

Defined by scalive.LiveRouteBuilder.locationEither. View source (scalive/api/src/scalive/routing/LiveRouting.scala:281-283)

def locationEither(value: A): Either[LiveLocation.EncodeError, LiveLocation]

Defined by scalive.LiveRouteBuilder.locationEither. View source (scalive/api/src/scalive/routing/LiveRouting.scala:275-276)

params

def params[Params](codec: LiveParamsCodec[A, Params]): LiveEncodableRouteParamsBuilder[A, Params]

Defined by scalive.LiveRouteBuilder.params. View source (scalive/api/src/scalive/routing/LiveRouting.scala:329-339)

def params: LiveEncodableRouteParamsBuilder[A, A]

Defined by scalive.LiveRouteBuilder.params. View source (scalive/api/src/scalive/routing/LiveRouting.scala:319-327)

paramsDecodeOnly

def paramsDecodeOnly[Params](decoder: LiveParamsDecoder[A, Params]): LiveRouteParamsBuilder[A, Params]

Defined by scalive.LiveRouteBuilder.paramsDecodeOnly. View source (scalive/api/src/scalive/routing/LiveRouting.scala:341-351)

query

def query[Query](codec: zio.http.codec.package.QueryCodec[Query])(using combiner: zio.http.codec.Combiner[A, Query]): LiveEncodableRouteParamsBuilder[A, combiner.Out]

Defined by scalive.LiveRouteBuilder.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:285-297)

def query[Query](name: String)(using evidence$1: zio.schema.Schema[Query], combiner: zio.http.codec.Combiner[A, Query]): LiveEncodableRouteParamsBuilder[A, combiner.Out]

Defined by scalive.LiveRouteBuilder.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:299-304)

def query[Query](using evidence$1: zio.schema.Schema[Query], combiner: zio.http.codec.Combiner[A, Query]): LiveEncodableRouteParamsBuilder[A, combiner.Out]

Defined by scalive.LiveRouteBuilder.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:313-317)

queryOptional

def queryOptional[Query](name: String)(using evidence$1: zio.schema.Schema[Query], combiner: zio.http.codec.Combiner[A, Option[Query]]): LiveEncodableRouteParamsBuilder[A, combiner.Out]

Defined by scalive.LiveRouteBuilder.queryOptional. View source (scalive/api/src/scalive/routing/LiveRouting.scala:306-311)

withConnectedResources

def withConnectedResources[Result <: Unit](initialize: (Any, ConnectedResources) => zio.Task[Result]): LiveRouteBuilder[A]

Appends setup for this route's connected resources, before connected mount. Callbacks run in declaration order, after session setup, and receive the context available here. They do not run during disconnected rendering and are not inherited by nested LiveViews.

Defined by scalive.LiveRouteBuilder.withConnectedResources. View source (scalive/api/src/scalive/routing/LiveRouting.scala:261-270)

withLayout

def withLayout(layout: LiveLayout[A, Any]): LiveRouteBuilder[A]

Defined by scalive.LiveRouteBuilder.withLayout. View source (scalive/api/src/scalive/routing/LiveRouting.scala:372-379)

withMountAspect

def withMountAspect[R, In, Out, Result](aspect: LiveRouteMountAspect[R, A, In, Out])(using append: ContextAppend.Aux[In, Out, Result]): LiveRouteMountAspectBuilder[R, A, In, Result]

Starts a typed route mount pipeline. The resulting context is supplied to route factories.

Defined by scalive.LiveRouteBuilder.withMountAspect. View source (scalive/api/src/scalive/routing/LiveRouting.scala:391-402)

withRootLayout

def withRootLayout(layout: LiveRootLayout[A, Any]): LiveRouteBuilder[A]

Defined by scalive.LiveRouteBuilder.withRootLayout. View source (scalive/api/src/scalive/routing/LiveRouting.scala:381-388)