Skip to main content

InitInfo

Struct InitInfo 

Source
pub struct InitInfo<V: VTab> { /* private fields */ }
Expand description

An interface to store and retrieve data during the table function’s init stage.

Implementations§

Source§

impl<V: VTab> InitInfo<V>

Source

pub fn bind_data(&self) -> &V::BindData

The bind data produced by VTab::bind for this call.

Read-only: for tracking state across calls to the execution callback, store it in the init data instead.

Source

pub fn set_max_threads(&self, max_threads: u64)

Sets how many threads may call the execution callback for this query in parallel. Defaults to 1 (single-threaded execution).

Source

pub fn column_indices(&self) -> Vec<usize>

The 0-based indices, into the function’s full result schema, of the columns the query actually needs — only meaningful when the function declared supports_projection_pushdown(). Empty if pushdown wasn’t requested or the function didn’t opt in, in which case every column should be written.

Source

pub fn extra_info<T>(&self) -> Option<&T>

The registration-time “extra info”, if any — see BindInfo::extra_info.

§Safety

The caller must request the same T that was stored at registration time; there is no runtime type check.

Auto Trait Implementations§

§

impl<V> !Send for InitInfo<V>

§

impl<V> !Sync for InitInfo<V>

§

impl<V> Freeze for InitInfo<V>

§

impl<V> RefUnwindSafe for InitInfo<V>

§

impl<V> Unpin for InitInfo<V>

§

impl<V> UnsafeUnpin for InitInfo<V>

§

impl<V> UnwindSafe for InitInfo<V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.