[][src]Trait attribution::FromParameterValue

pub trait FromParameterValue: Sized {
    fn from_parameter_value(
        parameter_val: ParamVal
    ) -> Result<Self, FromParameterValueError>; }

A trait that is used to create a type from a provided ParamVal. This trait should be implemented when a type should be able to be converted from a single ParamVal type.

Example

use attribution::FromParameterValue;
use attribution::ParamVal;

let param_val = ParamVal::Bool(true);
let from_result = bool::from_parameter_value(param_val);
assert_eq!(from_result.unwrap(), true);

Required methods

fn from_parameter_value(
    parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>

Tries to create a type from the provided ParamVal

Loading content...

Implementations on Foreign Types

impl FromParameterValue for u64[src]

impl FromParameterValue for bool[src]

impl FromParameterValue for String[src]

Loading content...

Implementors

Loading content...