Enum butane::SqlVal [−][src]
pub enum SqlVal { Null, Bool(bool), Int(i32), BigInt(i64), Real(f64), Text(String), Blob(Vec<u8, Global>), Timestamp(NaiveDateTime), Custom(Box<SqlValCustom, Global>), }
Expand description
Variants
Bool(bool)
Int(i32)
BigInt(i64)
Real(f64)
Text(String)
Timestamp(NaiveDateTime)
Custom(Box<SqlValCustom, Global>)
Implementations
Tests if this sqlval is compatible with the given
SqlType
. There are no implicit type conversions (i.e. if
this is a SqlVal::Bool
, it is only compatible with
SqlType::Bool
, not with SqlType::Int
, even though an int
contains enough information to encode a bool.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<SqlVal, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<SqlVal, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for SqlVal
impl UnwindSafe for SqlVal
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a reference to self
as a ToSql
trait object.
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V