Skip to main content

Module kernel_methods

Module kernel_methods 

Source
Expand description

v0.30.2 (ADR 0063): the enumerable kernel-method registry.

The value methods of the built-in kernels (List/Map/Option/Result/ String/Int/Float) are dispatched by the checker in crate::checker’s check_*_kernel_method functions, where the method names live in match arms — authoritative for typing, but not enumerable. This module is the enumerable view the LSP reads for .-member completion: per-kernel (name, signature) tables and a methods_for mapping from a receiver Ty to its methods.

The tables are generated from the typed operations in crate::kernel_op (#3164), where each method is declared once with its spelling and signature; the checker resolves a call to that enum and carries it in crate::checker::Callee::Kernel.

The signatures are human-readable Bynk-surface display strings (generic in the element/key/value type), for completion detail — not the checker’s Ty-typed signatures. The checker matches on the typed operations exhaustively, so the table can neither list a method the checker rejects nor omit one it accepts.

Re-exports§

pub use crate::kernel_op::KernelMethod;

Constants§

ALL_METHODS
Every method table above, by the type a user writes. The one enumerable registry (read by the wasm bynk_reference); a test pins it against the pub const *_METHODS declarations, so a new table cannot be left out.
BYTES_METHODS
The Bytes kernel (v0.110, ADR 0142).
DECIMAL_METHODS
The Decimal kernel (#2622).
DURATION_METHODS
The Duration kernel (v0.86, ADR 0112).
EFFECT_METHODS
The methods of every Effect[T] (#2683, #2711): within, race and detach.
EFFECT_RESULT_METHODS
The Effect[Result[T, E]] combinators (v0.152, ADR 0176): within and race (on every Effect) alongside the compiler-synthesised combinators.
FLOAT_METHODS
The Float kernel.
HTTP_RESULT_METHODS
HttpResult[T] (#3277): withCookie, clearCookie, cookies.
INSTANT_METHODS
The Instant kernel (v0.90, ADR 0114).
INT_METHODS
The Int kernel.
LIST_METHODS
List[T] (v0.20b; v0.88 adds the ADR 0116 query/collection vocabulary).
MAP_METHODS
Map[K, V] (v0.20b).
OPTION_METHODS
Option[T] combinators (v0.22a).
QUERY_METHODS
Query[T] (v0.91, ADR 0115; joins/grouping v0.94, ADR 0116/0120): the lazy storage-query vocabulary a store collection lifts into.
REQUEST_COOKIES_METHODS
An HTTP handler’s raw cookies (#3277).
REQUEST_HEADERS_METHODS
An HTTP handler’s headers (#2341).
REQUEST_QUERY_METHODS
An HTTP handler’s query (#2854).
RESULT_METHODS
Result[T, E] combinators (v0.22a).
SET_METHODS
The Set kernel (K6a, #2596): what Bynk cannot write over a list. The combinators (union, intersect, …) are the bynk.set commons.
STRING_METHODS
The String kernel (v0.22a; UTF-16 code units, except chars).
TEST_CONNECTION_METHODS
A case’s recording TestConnection[F] (#3051).
TOKEN_CLAIMS_METHODS
An Oidc binder’s claims (#2380).

Functions§

methods_for
The value methods of a receiver type, or &[] for a type with no kernel methods (record/sum named types, Bool, Effect, …). Record fields are resolved separately by the LSP (they need the type declaration).