Skip to content
DocumentationBuild other application targets
On this page

Page resources

Open Markdownllms.txtView source

Last updated

One contracts can enter ordinary application frameworks without turning those frameworks into One renderers. The APIs below are illustrative end-product syntax; each application keeps its own root and generated projection receipt.

SwiftUI client

struct OrderScreen: View {
    let client: OrdersClient
    let key: OrderKey
    @State private var state: ResourceState<OrderView> = .empty

    var body: some View {
        OrderContent(state: state)
            .task { state = await client.get(key) }
    }
}

SwiftUI owns navigation, view state, layout, accessibility, and lifecycle. The generated client owns nominal values, operation calls, codecs, and dispositions.

Rust terminal application

match client.get(&key)? {
    Success(order) => terminal.show_order(order),
    DomainFault(NotFound) => terminal.show_not_found(key),
    OuterCause(Denied) => terminal.show_access_required(),
    OuterCause(cause) => terminal.show_recovery(cause),
}

ParcelHub's current terminal presentation owns executable evidence for exact generated dispatch and unknown-outcome operator guidance.

Intermittently connected device

const result = await telemetry.append(batch, {
  cursor: retainedCursor,
  lease: selectedLease,
});

if (result.kind === "gapDetected") await resnapshot(result.oldestAvailable);
if (result.kind === "revoked") stopOfflineSubmission();

Offline capability is explicit and bounded. A disconnected device does not retain online authority indefinitely or invent successful synchronization.

See applications and Generate and use an SDK client.