pub trait VtabModuleFactory: Send + Sync {
// Required method
fn create(
&self,
cx: &Cx,
args: &[&str],
) -> Result<Box<dyn ErasedVtabInstance>>;
// Provided methods
fn connect(
&self,
cx: &Cx,
args: &[&str],
) -> Result<Box<dyn ErasedVtabInstance>> { ... }
fn column_info(&self, _args: &[&str]) -> Vec<(String, char)> { ... }
}Expand description
A type-erased virtual table module factory.
Registered with the connection via register_module("name", factory).
When CREATE VIRTUAL TABLE ... USING name(args) is executed, the
factory’s create method is called to produce a concrete vtab instance.