Trait FromEcfValue

Source
pub trait FromEcfValue: Sized {
    const TYPE_NAME_SINGULAR: &'static str;

    // Required method
    fn from_ecf_value(input: &Value) -> Option<&Self>;
}
Expand description

Converts an ecf::Value into a generic type

Required Associated Constants§

Source

const TYPE_NAME_SINGULAR: &'static str

Name of the generic type, used for error messages, needs to be singular and uppercase (example: “a String”)

Required Methods§

Source

fn from_ecf_value(input: &Value) -> Option<&Self>

Main functionality

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

Source§

const TYPE_NAME_SINGULAR: &'static str = "a Bool"

Source§

fn from_ecf_value(input: &Value) -> Option<&Self>

Source§

impl FromEcfValue for f64

Source§

const TYPE_NAME_SINGULAR: &'static str = "a Float"

Source§

fn from_ecf_value(input: &Value) -> Option<&Self>

Source§

impl FromEcfValue for i64

Source§

const TYPE_NAME_SINGULAR: &'static str = "an Int"

Source§

fn from_ecf_value(input: &Value) -> Option<&Self>

Source§

impl FromEcfValue for String

Source§

const TYPE_NAME_SINGULAR: &'static str = "a String"

Source§

fn from_ecf_value(input: &Value) -> Option<&Self>

Implementors§