pub struct SqliteValueRef<'r>(/* private fields */);Expand description
A borrowed reference to a sqlite3_value.
Semantically, this behaves as a reference to SqliteValue.
§Note: Decoding is Stateful
See SqliteValue for details.
Implementations§
Source§impl<'r> SqliteValueRef<'r>
impl<'r> SqliteValueRef<'r>
Sourcepub fn try_to_owned(&self) -> Result<SqliteValue, SqliteError>
pub fn try_to_owned(&self) -> Result<SqliteValue, SqliteError>
Attempt to duplicate the internal sqlite3_value with sqlite3_value_dup().
Returns an error if the call returns a null pointer, indicating that SQLite was unable to allocate the additional memory required.
Non-panicking version of Self::try_to_owned().
Trait Implementations§
Source§impl<'r> ValueRef<'r> for SqliteValueRef<'r>
impl<'r> ValueRef<'r> for SqliteValueRef<'r>
Source§fn to_owned(&self) -> SqliteValue
fn to_owned(&self) -> SqliteValue
Attempt to duplicate the internal sqlite3_value with sqlite3_value_dup().
§Panics
If sqlite3_value_dup() returns a null pointer, indicating an out-of-memory condition.
See Self::try_to_owned() for a non-panicking version.
type Database = Sqlite
Source§fn type_info(&self) -> Cow<'_, SqliteTypeInfo>
fn type_info(&self) -> Cow<'_, SqliteTypeInfo>
Get the type information for this value.
Auto Trait Implementations§
impl<'r> !Freeze for SqliteValueRef<'r>
impl<'r> !RefUnwindSafe for SqliteValueRef<'r>
impl<'r> !Send for SqliteValueRef<'r>
impl<'r> !Sync for SqliteValueRef<'r>
impl<'r> !UnwindSafe for SqliteValueRef<'r>
impl<'r> Forget for SqliteValueRef<'r>
impl<'r> Move for SqliteValueRef<'r>
impl<'r> Unpin for SqliteValueRef<'r>
impl<'r> UnsafeUnpin for SqliteValueRef<'r>where
&'r ValueHandle: UnsafeUnpin,
ValueHandle: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.