ValueConverter

Trait ValueConverter 

Source
pub trait ValueConverter: Sized {
    // Required method
    fn from_value(value: Arc<Value>) -> Result<Self>;
}
Expand description

Convert Value to native types used by functions.

Required Methods§

Source

fn from_value(value: Arc<Value>) -> Result<Self>

Convert a Value to this native type.

§Arguments
  • value - The value to convert
§Returns

Returns a Result<Self> containing the converted value or an error if conversion fails.

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 ValueConverter for bool

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl ValueConverter for f64

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl ValueConverter for Arc<str>

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl ValueConverter for Vec<f64>

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl ValueConverter for Vec<Arc<str>>

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl ValueConverter for DateTime

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Source§

impl<T: ValueConverter> ValueConverter for Vec<Arc<T>>

Source§

fn from_value(value: Arc<Value>) -> Result<Self>

Implementors§