Trait arithmetic_eval::fns::TryFromValue

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

Fallible conversion from Value to a function argument.

This trait is implemented for base value types (such as Numbers, Functions, Values), and for two container types: vectors and tuples.

Required Methods§

source

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

Attempts to convert value to a type supported by the function.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Num, T> TryFromValue<Num> for (T,)
where T: TryFromValue<Num>,

source§

impl<Num, T, U> TryFromValue<Num> for (T, U)
where T: TryFromValue<Num>, U: TryFromValue<Num>,

source§

impl<Num, T, U, V> TryFromValue<Num> for (T, U, V)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>,

source§

impl<Num, T, U, V, W> TryFromValue<Num> for (T, U, V, W)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X> TryFromValue<Num> for (T, U, V, W, X)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X, Y> TryFromValue<Num> for (T, U, V, W, X, Y)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>, Y: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X, Y, Z> TryFromValue<Num> for (T, U, V, W, X, Y, Z)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>, Y: TryFromValue<Num>, Z: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X, Y, Z, A> TryFromValue<Num> for (T, U, V, W, X, Y, Z, A)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>, Y: TryFromValue<Num>, Z: TryFromValue<Num>, A: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X, Y, Z, A, B> TryFromValue<Num> for (T, U, V, W, X, Y, Z, A, B)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>, Y: TryFromValue<Num>, Z: TryFromValue<Num>, A: TryFromValue<Num>, B: TryFromValue<Num>,

source§

impl<Num, T, U, V, W, X, Y, Z, A, B, C> TryFromValue<Num> for (T, U, V, W, X, Y, Z, A, B, C)
where T: TryFromValue<Num>, U: TryFromValue<Num>, V: TryFromValue<Num>, W: TryFromValue<Num>, X: TryFromValue<Num>, Y: TryFromValue<Num>, Z: TryFromValue<Num>, A: TryFromValue<Num>, B: TryFromValue<Num>, C: TryFromValue<Num>,

source§

impl<T> TryFromValue<T> for bool

source§

impl<U, T> TryFromValue<T> for Vec<U>
where U: TryFromValue<T>,

Implementors§

source§

impl<T> TryFromValue<T> for Function<T>

source§

impl<T> TryFromValue<T> for Value<T>

source§

impl<T> TryFromValue<T> for Object<T>

source§

impl<T> TryFromValue<T> for Tuple<T>

source§

impl<T: Number> TryFromValue<T> for T