Skip to main content

Context

Struct Context 

Source
pub struct Context<'p, P: Sqlite3Api> { /* private fields */ }
Expand description

Context wrapper passed to user-defined functions.

Implementations§

Source§

impl<'p, P: Sqlite3Api> Context<'p, P>

Source

pub fn result_null(&self)

Set NULL result.

Source

pub fn result_int64(&self, v: i64)

Set integer result.

Source

pub fn result_double(&self, v: f64)

Set floating result.

Source

pub fn result_text(&self, v: &str)

Set text result (provider must copy or retain the bytes as needed).

Source

pub fn result_blob(&self, v: &[u8])

Set blob result (provider must copy or retain the bytes as needed).

Source

pub fn result_error(&self, msg: &str)

Set error result.

Source

pub fn result_value(&self, value: Value)

Set result from an owned Value.

Auto Trait Implementations§

§

impl<'p, P> Freeze for Context<'p, P>

§

impl<'p, P> RefUnwindSafe for Context<'p, P>

§

impl<'p, P> !Send for Context<'p, P>

§

impl<'p, P> !Sync for Context<'p, P>

§

impl<'p, P> Unpin for Context<'p, P>

§

impl<'p, P> UnsafeUnpin for Context<'p, P>

§

impl<'p, P> UnwindSafe for Context<'p, P>

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.