Struct sqlite_loadable::api::Value
source · pub struct Value { /* private fields */ }Expand description
Ergonomic wrapper around a raw sqlite3_value. It is the caller’s reponsibility to ensure that a given pointer points to a valid sqlite3_value object. There seems to be a 5-10% perf cost when using Value vs calling functions on raw pointers
Implementations§
source§impl Value
impl Value
sourcepub fn from(value: &*mut sqlite3_value) -> Result<Value>
pub fn from(value: &*mut sqlite3_value) -> Result<Value>
Create a Value struct from a borrowed sqlite3_value pointer
sourcepub fn at(values: &[*mut sqlite3_value], at: usize) -> Option<Value>
pub fn at(values: &[*mut sqlite3_value], at: usize) -> Option<Value>
Create a Value struct from a sqlite3_value pointer slice at the given index.
sourcepub fn notnull_or(&self, error: Error) -> Result<&Self>
pub fn notnull_or(&self, error: Error) -> Result<&Self>
Ensure that the value’s type isn’t SQLITE_NULL - return the given error as an Err.
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more