pub struct TypedValue {
pub value: Value,
pub type_hint: Option<Type>,
}Expand description
A parameter value paired with an optional type hint.
Type hints let drivers pick the right wire format when the value alone
is ambiguous (e.g. distinguishing INTEGER from BIGINT).
§Example
use toasty_sql::TypedValue;
let tv = TypedValue {
value: toasty_core::stmt::Value::Null,
type_hint: None,
};
assert!(tv.type_hint.is_none());Fields§
§value: ValueThe parameter value.
type_hint: Option<Type>An optional type hint for the value.
Implementations§
Trait Implementations§
Source§impl Clone for TypedValue
impl Clone for TypedValue
Source§fn clone(&self) -> TypedValue
fn clone(&self) -> TypedValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TypedValue
impl RefUnwindSafe for TypedValue
impl Send for TypedValue
impl Sync for TypedValue
impl Unpin for TypedValue
impl UnwindSafe for TypedValue
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