pub unsafe trait FromValue {
// Required method
fn from_value(v: Value) -> Self;
}Expand description
FromValue is used to convert from OCaml values to Rust types
NOTE: This should only be used after the OCaml runtime has been initialized, when calling
Rust functions from OCaml, the runtime is already initialized otherwise ocaml::Runtime::init
should be used
Required Methods§
Sourcefn from_value(v: Value) -> Self
fn from_value(v: Value) -> Self
Convert from OCaml value
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 FromValue for String
Available on non-crate feature no-std only.
impl FromValue for String
Available on non-crate feature
no-std only.fn from_value(value: Value) -> String
Source§impl<A: FromValue, B: FromValue> FromValue for Result<A, B>
impl<A: FromValue, B: FromValue> FromValue for Result<A, B>
fn from_value(value: Value) -> Result<A, B>
Source§impl<A: FromValue, B: FromValue> FromValue for (A, B)
impl<A: FromValue, B: FromValue> FromValue for (A, B)
fn from_value(v: Value) -> (A, B)
Source§impl<A: FromValue, B: FromValue, C: FromValue> FromValue for (A, B, C)
impl<A: FromValue, B: FromValue, C: FromValue> FromValue for (A, B, C)
fn from_value(v: Value) -> (A, B, C)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue> FromValue for (A, B, C, D)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue> FromValue for (A, B, C, D)
fn from_value(v: Value) -> (A, B, C, D)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue> FromValue for (A, B, C, D, E)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue> FromValue for (A, B, C, D, E)
fn from_value(v: Value) -> (A, B, C, D, E)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue> FromValue for (A, B, C, D, E, F)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue> FromValue for (A, B, C, D, E, F)
fn from_value(v: Value) -> (A, B, C, D, E, F)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue> FromValue for (A, B, C, D, E, F, G)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue> FromValue for (A, B, C, D, E, F, G)
fn from_value(v: Value) -> (A, B, C, D, E, F, G)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue> FromValue for (A, B, C, D, E, F, G, H)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue> FromValue for (A, B, C, D, E, F, G, H)
fn from_value(v: Value) -> (A, B, C, D, E, F, G, H)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue> FromValue for (A, B, C, D, E, F, G, H, I)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue> FromValue for (A, B, C, D, E, F, G, H, I)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue, T: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue, T: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
Source§impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue, T: FromValue, U: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)
impl<A: FromValue, B: FromValue, C: FromValue, D: FromValue, E: FromValue, F: FromValue, G: FromValue, H: FromValue, I: FromValue, J: FromValue, K: FromValue, L: FromValue, M: FromValue, N: FromValue, O: FromValue, P: FromValue, Q: FromValue, R: FromValue, S: FromValue, T: FromValue, U: FromValue> FromValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)
Source§impl<K: Ord + FromValue, V: FromValue> FromValue for BTreeMap<K, V>
Available on non-crate feature no-std only.
impl<K: Ord + FromValue, V: FromValue> FromValue for BTreeMap<K, V>
Available on non-crate feature
no-std only.fn from_value(v: Value) -> BTreeMap<K, V>
Source§impl<T: FromValue> FromValue for LinkedList<T>
Available on non-crate feature no-std only.
impl<T: FromValue> FromValue for LinkedList<T>
Available on non-crate feature
no-std only.fn from_value(v: Value) -> LinkedList<T>
Source§impl<V: FromValue> FromValue for Box<V>
Available on non-crate feature no-std only.
impl<V: FromValue> FromValue for Box<V>
Available on non-crate feature
no-std only.fn from_value(v: Value) -> Box<V>
Source§impl<V: FromValue> FromValue for Vec<V>
Available on non-crate feature no-std only.
impl<V: FromValue> FromValue for Vec<V>
Available on non-crate feature
no-std only.