Struct rusqlite::functions::Context

source ·
pub struct Context<'a> { /* private fields */ }
Expand description

Context is a wrapper for the SQLite function evaluation context.

Implementations§

Returns the number of arguments to the function.

Returns true when there is no argument.

Returns the idxth argument as a T.

Failure

Will panic if idx is greater than or equal to self.len().

Will return Err if the underlying SQLite type cannot be converted to a T.

Returns the idxth argument as a ValueRef.

Failure

Will panic if idx is greater than or equal to self.len().

Sets the auxilliary data associated with a particular parameter. See https://www.sqlite.org/c3ref/get_auxdata.html for a discussion of this feature, or the unit tests of this module for an example.

Gets the auxilliary data that was associated with a given parameter via set_aux. Returns None if no data has been associated.

Unsafety

This function is unsafe as there is no guarantee that the type T requested matches the type T that was provided to set_aux. The types must be identical.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.