Skip to main content

Module handoff_ref

Module handoff_ref 

Source
Expand description

Reference handles for capturing singletons, optionals, and streams in q!() closures.

Each handle type wraps a &RefCell<HydroNode> and, when captured inside a q!() closure, registers itself with the current capture scope. At codegen time, the IR node is lowered to the corresponding DFIR pseudo-operator (singleton(), optional(), or handoff()), and the reference resolves to the appropriate borrow type.

Structs§

OptionalMut
A mutable reference handle to an optional, resolves to &mut Option<T> at runtime.
OptionalRef
A shared reference handle to an optional, resolves to &Option<T> at runtime.
SingletonMut
A mutable reference handle to a singleton, resolves to &mut T at runtime.
SingletonRef
A shared reference handle to a singleton, resolves to &T at runtime.
StreamMut
A mutable reference handle to a stream’s handoff buffer, resolves to &mut Vec<T> at runtime.
StreamRef
A shared reference handle to a stream’s handoff buffer, resolves to &Vec<T> at runtime.

Enums§

HandoffRefKind
Determines which DFIR pseudo-operator a reference node lowers to.

Functions§

with_ref_capture
Activate the reference capture context. Must be called before q!() expansion that may capture handoff references. Returns a ClosureExpr bundling the expression with any captured references.