macro_rules! duck_state {
($ty:ty) => { ... };
}Expand description
Returns a clone of the current scalar function’s State, from inside a
#[duckdb_scalar(state = ...)] function body.
Type must be Clone — the macro always returns an independently owned
value, never a reference into ambient context.
§Panics
Panics if called outside a scalar function callback, or if Type doesn’t
match the function’s declared state type — contained by this crate’s
callback machinery, so it always surfaces as a normal query error, never
undefined behavior.