pub struct CljxFn {
pub name: Option<Arc<str>>,
pub arities: Vec<CljxFnArity>,
pub closed_over_names: Vec<Arc<str>>,
pub closed_over_vals: Vec<Value>,
pub is_macro: bool,
pub is_async: bool,
pub defining_ns: Arc<str>,
pub self_ptr: Option<GcPtr<CljxFn>>,
}Expand description
An interpreted Clojure closure with captured environment.
Fields§
§name: Option<Arc<str>>§arities: Vec<CljxFnArity>§closed_over_names: Vec<Arc<str>>Names of closed-over bindings (parallel to closed_over_vals).
closed_over_vals: Vec<Value>Values of closed-over bindings (parallel to closed_over_names).
is_macro: boolTrue if this function was defined with defmacro.
is_async: boolTrue if this function carries ^:async metadata. When an async runtime
(cljrs-async) is registered, calling such a function spawns its body as
a task and returns a Value::Future immediately instead of running it
synchronously. Without a runtime it runs synchronously like any other fn.
defining_ns: Arc<str>Namespace in which this function was defined (for macro hygiene).
self_ptr: Option<GcPtr<CljxFn>>Back-pointer to the GcPtr that owns this CljxFn, set immediately
after allocation so that a named anonymous function’s self-reference
(e.g. (fn g [] g)) returns the identical pointer to the caller,
preserving pointer-equality semantics ((= f (f)) → true).