Trait ValueType

Source
pub trait ValueType: Sized {
    // Required methods
    fn try_from(v: Value) -> Result<Self, ValueTypeErr>;
    fn type_name() -> String;
    fn array_type() -> ArrayType;
    fn column_type() -> ColumnType;

    // Provided methods
    fn unwrap(v: Value) -> Self { ... }
    fn expect(v: Value, msg: &str) -> Self { ... }
}

Required Methods§

Provided Methods§

Source

fn unwrap(v: Value) -> Self

Source

fn expect(v: Value, msg: &str) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ValueType for Cow<'_, str>

Source§

impl ValueType for bool

Source§

impl ValueType for char

Source§

impl ValueType for f32

Source§

impl ValueType for f64

Source§

impl ValueType for i8

Source§

impl ValueType for i16

Source§

impl ValueType for i32

Source§

impl ValueType for i64

Source§

impl ValueType for u8

Source§

impl ValueType for u16

Source§

impl ValueType for u32

Source§

impl ValueType for u64

Source§

impl ValueType for String

Source§

impl ValueType for Vec<u8>

Source§

impl<T> ValueType for Option<T>
where T: ValueType + Nullable,

Implementors§