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§
- Optional
Mut - A mutable reference handle to an optional, resolves to
&mut Option<T>at runtime. - Optional
Ref - A shared reference handle to an optional, resolves to
&Option<T>at runtime. - Singleton
Mut - A mutable reference handle to a singleton, resolves to
&mut Tat runtime. - Singleton
Ref - A shared reference handle to a singleton, resolves to
&Tat runtime. - Stream
Mut - A mutable reference handle to a stream’s handoff buffer, resolves to
&mut Vec<T>at runtime. - Stream
Ref - A shared reference handle to a stream’s handoff buffer, resolves to
&Vec<T>at runtime.
Enums§
- Handoff
RefKind - 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 aClosureExprbundling the expression with any captured references.