Skip to main content

VirtualTable

Trait VirtualTable 

Source
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§

Source

type Cursor: VTabCursor<P>

Cursor type opened by this table.

Source

type Error: Into<Error>

Error type mapped into crate Error.

Required Methods§

Source

fn connect(args: &[&str]) -> Result<(Self, String), Self::Error>

Create/connect a table instance from SQLite module arguments.

Source

fn disconnect(self) -> Result<(), Self::Error>

Disconnect and release table resources.

Source

fn open(&self) -> Result<Self::Cursor, Self::Error>

Open a new cursor over this table.

Provided Methods§

Source

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.

Implementors§