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.
Sourcepub fn notnull_or_else<F>(&self, err: F) -> Result<&Self>
pub fn notnull_or_else<F>(&self, err: F) -> Result<&Self>
Ensure that the value’s type isn’t SQLITE_NULL - otherwise call the error function and return as Err.
Auto Trait Implementations§
impl Freeze for Value
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