Trait mysql::value::FromValue [] [src]

pub trait FromValue {
    fn from_value(v: Value) -> Self;
    fn from_value_opt(v: Value) -> Result<Self, Value> where Self: Sized;
}

Implement this trait to convert value to something.

Required Methods

fn from_value(v: Value) -> Self

Will panic if could not convert v to Self

fn from_value_opt(v: Value) -> Result<Self, Value> where Self: Sized

Will return Err(v) if could not convert v to Self

Implementors