Server.value
luastra/serverServer.value(value: T): Nullable<T>
Creates the frozen value branch of Server.Nullable so generated schema-v2 clients can carry a non-null value without confusing it with absence.
Before you use it
Add luastra/server to this module's dependencies in luastra.json, then import it with require("luastra/server"). Declare rpc.call in luastra.json and configure a declared backend operation with a deployed trusted handler. Application code should prefer its generated operation function and decoder.
How it fits
Server.value creates a frozen tagged nullable value synchronously and performs no host work.
When to use it
Use the generated Api.value alias when a nullable field contains a value. Pass ordinary values directly only to non-nullable fields.
Parameters
| Parameter | Type / values | Description |
|---|---|---|
| value | T | Non-null value wrapped for a nullable schema-v2 field. |
Returns
Nullable<T> — the exact Nullable<T> value declared by the SDK contract.
What happens next
A frozen tagged null or non-null value accepted by a generated schema-v2 encoder.
Failures and fixes
Handle transport failure, envelope decode failure, and domain validation failure separately. The static web build does not deploy trusted backend handlers, credentials, or production operations for you.
Availability
Public-source alpha API in 0.5.0-alpha; production backend deployment remains application-owned.
Focused example
local Api = require("app/generated/server-functions")
local cursor = Api.value("cursor-2")