#[repr(transparent)]pub struct RawScalarBindInfo(pub duckdb_bind_info);Expand description
The argument DuckDB passes to a scalar function bind callback: a
duckdb_bind_info, in a type of its own.
A table function’s bind callback receives a duckdb_bind_info too, but
DuckDB casts it to a different, larger struct, so a callback written for
one kind of function corrupts memory when registered on the other (a
table bind’s duckdb_bind_set_error writes past the scalar bind info).
With its own argument type, ScalarBindFn
no longer accepts a table callback, and a scalar callback no longer fits a
table function’s bind. #[repr(transparent)], so the C ABI is the
pointer’s.
ⓘ
use quack_rs::scalar::ScalarFunctionBuilder;
quack_rs::table_bind_callback!(table_bind, |_info| {});
// Does not compile: a table bind callback takes a `duckdb_bind_info`.
let _ = ScalarFunctionBuilder::new("f").bind(table_bind);Tuple Fields§
§0: duckdb_bind_infoTrait Implementations§
Source§impl Clone for RawScalarBindInfo
impl Clone for RawScalarBindInfo
Source§fn clone(&self) -> RawScalarBindInfo
fn clone(&self) -> RawScalarBindInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RawScalarBindInfo
Auto Trait Implementations§
impl !Send for RawScalarBindInfo
impl !Sync for RawScalarBindInfo
impl Freeze for RawScalarBindInfo
impl RefUnwindSafe for RawScalarBindInfo
impl Unpin for RawScalarBindInfo
impl UnsafeUnpin for RawScalarBindInfo
impl UnwindSafe for RawScalarBindInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more