[−][src]Trait attribution::FromParameterValue
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>
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
Tries to create a type from the provided ParamVal
Implementations on Foreign Types
impl FromParameterValue for u64
[src]
fn from_parameter_value(
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
[src]
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
impl FromParameterValue for bool
[src]
fn from_parameter_value(
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
[src]
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
impl FromParameterValue for String
[src]
fn from_parameter_value(
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>
[src]
parameter_val: ParamVal
) -> Result<Self, FromParameterValueError>