TryFromValue

Trait TryFromValue 

Source
pub trait TryFromValue: Sized {
    // Required method
    fn try_from_value(value: Value) -> Result<Self, EvaluationError>;
}
Expand description

A falible Script-value to Rust-value conversion that consumes the input.

Required Methods§

Source

fn try_from_value(value: Value) -> Result<Self, EvaluationError>

Performs the conversion.

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 TryFromValue for Value

Source§

impl TryFromValue for bool

Source§

impl TryFromValue for f32

Source§

impl TryFromValue for f64

Source§

impl TryFromValue for i8

Source§

impl TryFromValue for i16

Source§

impl TryFromValue for i32

Source§

impl TryFromValue for i64

Source§

impl TryFromValue for u8

Source§

impl TryFromValue for u16

Source§

impl TryFromValue for u32

Source§

impl TryFromValue for u64

Source§

impl TryFromValue for String

Source§

impl TryFromValue for Map<String, Value>

Source§

impl<K: TryFromValue> TryFromValue for Vec<K>

Source§

impl<K: TryFromValue> TryFromValue for HashMap<String, K>

Implementors§

Source§

impl TryFromValue for pdk_script::Value