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)
Tuple Fields of Bool
0: bool
Int(i32)
Tuple Fields of Int
0: i32
BigInt(i64)
Tuple Fields of BigInt
0: i64
Real(f64)
Tuple Fields of Real
0: f64
Text(String)
Tuple Fields of Text
0: String
Timestamp(NaiveDateTime)
Tuple Fields of Timestamp
Custom(Box<SqlValCustom, Global>)
Tuple Fields of Custom
0: 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.