Skip to main content

Module types

Module types 

Source
Expand description

Stub types for Phase 4/7 that are referenced by the Value enum.

Structs§

Agent
A Clojure agent — asynchronous state update queue.
Atom
A Clojure atom — a thread-safe mutable reference.
BoundFn
A function wrapped with captured dynamic bindings. When called, the captured bindings are pushed as a frame before delegating to the wrapped function. This means captured bindings override the caller’s for the same var, but vars not in the capture fall through normally.
CljxCons
A lazy cons cell: head element + tail (may be a LazySeq, List, or Nil).
CljxFn
An interpreted Clojure closure with captured environment.
CljxFnArity
One arity branch of a Clojure function.
CljxFuture
A future value computed asynchronously on another thread.
CljxPromise
A one-shot rendezvous (promise).
Delay
A lazy one-time computation (forced at most once, result cached).
LazySeq
A lazy sequence that forces its thunk exactly once and caches the result.
MultiFn
A Clojure multimethod — arbitrary dispatch via a user-supplied function.
Namespace
A Clojure namespace with intern table, refers, and aliases.
NativeFn
Protocol
A Clojure protocol — an interface-like construct with named methods.
ProtocolFn
Callable that dispatches a single protocol method on the type of args[0].
ProtocolMethod
One method signature declared in a defprotocol.
Var
A Clojure var — a namespace-interned mutable root binding.
Volatile
Non-atomic mutable cell (single-thread performance, no CAS).

Enums§

AgentMsg
Messages sent to an agent’s worker thread.
Arity
DelayState
Internal state of a delay cell.
FutureState
Thread-pool future state.
LazySeqState
Internal state of a lazy sequence cell.

Traits§

Thunk
A deferred computation that produces a Value when forced.

Type Aliases§

AgentFn
A Clojure agent action: takes the current state, returns the new state.
MethodMap
Inner map type for protocol implementations: method_name → impl fn.
NativeFnFunc
The callable stored inside a NativeFn. Supports both bare function pointers and closures that capture state.
NativeFnPtr
A Rust function callable from Clojure. Legacy type alias kept for source compatibility. Bare fn pointers implement Fn and can be passed anywhere a NativeFnFunc is expected.