pub trait VirtualTable<P: Sqlite3Api>: Sized + Send {
type Cursor: VTabCursor<P>;
type Error: Into<Error>;
// Required methods
fn connect(args: &[&str]) -> Result<(Self, String), Self::Error>;
fn disconnect(self) -> Result<(), Self::Error>;
fn open(&self) -> Result<Self::Cursor, Self::Error>;
// Provided method
fn best_index(&self, _info: &mut BestIndexInfo) -> Result<(), Self::Error> { ... }
}Expand description
Virtual table implementation.
Required Associated Types§
Sourcetype Cursor: VTabCursor<P>
type Cursor: VTabCursor<P>
Cursor type opened by this table.
Required Methods§
Sourcefn connect(args: &[&str]) -> Result<(Self, String), Self::Error>
fn connect(args: &[&str]) -> Result<(Self, String), Self::Error>
Create/connect a table instance from SQLite module arguments.
Sourcefn disconnect(self) -> Result<(), Self::Error>
fn disconnect(self) -> Result<(), Self::Error>
Disconnect and release table resources.
Provided Methods§
Sourcefn best_index(&self, _info: &mut BestIndexInfo) -> Result<(), Self::Error>
fn best_index(&self, _info: &mut BestIndexInfo) -> Result<(), Self::Error>
Populate best-index constraints/order information.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.