halotukozak.mrpc.derive

Members list

Type members

Classlikes

Server-adapter derivation: builds an AsRaw[RawRpc[Raw], Real] that turns a real trait instance into a transport-facing RawRpc. The generated RawRpc[Raw] dispatches each incoming RawInvocation by rpcName, decodes every argument to its exact declared parameter type via a summoned AsReal[Raw, paramType], calls halotukozak.made.Done.invoke, and encodes the result back to Raw.

Server-adapter derivation: builds an AsRaw[RawRpc[Raw], Real] that turns a real trait instance into a transport-facing RawRpc. The generated RawRpc[Raw] dispatches each incoming RawInvocation by rpcName, decodes every argument to its exact declared parameter type via a summoned AsReal[Raw, paramType], calls halotukozak.made.Done.invoke, and encodes the result back to Raw.

The fire/call/get match arms are partitioned by arity — only fire-arity ops appear in fire, and so on. An rpcName outside an arity's known set is rejected explicitly (no silent no-op), mirroring commons' unknown-method handling.

Attributes

Source
AsRawDerivation.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Client-proxy derivation: builds an AsReal[RawRpc[Raw], Real] that turns a transport-facing RawRpc into a concrete implementation of the real trait.

Client-proxy derivation: builds an AsReal[RawRpc[Raw], Real] that turns a transport-facing RawRpc into a concrete implementation of the real trait.

The trait synthesis is delegated to made's Done.materialize (the tuple-of-handlers .to[Real]): one Handler per operation — each an op.Args => op.OutputType function that packages a RawInvocation and forwards to the underlying RawRpc[Raw]'s fire/call/get by arity, decoding the result back via a summoned AsReal. made wires method i to handler i (declaration order = Done.Operations order = Plans[Real].Underlying order), so mrpc carries no proxy macro of its own.

Arity routing and per-handler body live in Handler; this object's only job is to read every classified OpPlan off Plans and assemble the handler tuple halotukozak.made.Done.materialize expects.

Attributes

Source
AsRealDerivation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Handler

Attributes

Source
Handler.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Handler.type
object OpPlan

Attributes

Source
OpPlan.scala
Supertypes
class Object
trait Matchable
class Any
Self type
OpPlan.type
object ParamPlan

Attributes

Source
OpPlan.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ParamPlan.type
object Plans

Attributes

Source
OpPlan.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Plans.type
object RpcNames

Attributes

Source
RpcNames.scala
Supertypes
class Object
trait Matchable
class Any
Self type
RpcNames.type

Types

type ArgsOf[Plan] = Plan match { case OpPlan { type Args = args; } => args & Tuple }

Attributes

Source
Handler.scala
opaque type EmptyHandler[Raw, Plan <: OpPlan]

Attributes

Source
Handler.scala
opaque type Handler[Raw, Plan <: OpPlan]

Attributes

Source
Handler.scala
opaque type NonEmptyHandler[Raw, Plan <: OpPlan]

Attributes

Source
Handler.scala

Value members

Concrete methods

inline def matchFrom[Names <: Tuple, Values <: Tuple](args: NamedTuple[Names, Values])[R](inline scrutinee: String, inline reject: R): R

Attributes

Source
Match.scala
def matchFromImpl[Names <: Tuple, Values <: Tuple, R](scrutinee: Expr[String], args: Expr[NamedTuple[Names, Values]], reject: Expr[R])(using evidence$1: Type[Names], evidence$2: Type[Values], evidence$3: Type[R], Quotes): Expr[R]

Attributes

Source
Match.scala
transparent inline def widen[T](inline a: T): T

Attributes

Source
Widen.scala