Skip to content
Konjure / spatial intelligence

noop

← Builtin reference

Does nothing and returns a successful Unit result; useful as a default zero-argument callback.

Signature

func noop() -> Res[Unit, DataError]

It is a concrete function value, so it can be stored in Button.action without a string callback name or a host effect.

Returns

Res[Unit, DataError]

Ok(Unit) without a state change.

Examples

Default action

noop is assignable to a zero-argument recoverable callback.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
(no log output)

Rust definition

Rust interpreter builtin dispatch; Type is func() -> Res[Unit, DataError].

See also