pub unsafe trait ToValue {
// Required method
fn to_value(&self, rt: &Runtime) -> Value;
}Expand description
ToValue is used to convert from Rust types to OCaml values
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§
Implementations on Foreign Types§
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue> ToValue for (A, B, C, D, E, F)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue> ToValue for (A, B, C, D, E, F)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue> ToValue for (A, B, C, D, E, F, G)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue> ToValue for (A, B, C, D, E, F, G)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue> ToValue for (A, B, C, D, E, F, G, H)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue> ToValue for (A, B, C, D, E, F, G, H)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue> ToValue for (A, B, C, D, E, F, G, H, I)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue> ToValue for (A, B, C, D, E, F, G, H, I)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue, T: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue, T: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
Source§impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue, T: ToValue, U: ToValue> ToValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)
impl<A: ToValue, B: ToValue, C: ToValue, D: ToValue, E: ToValue, F: ToValue, G: ToValue, H: ToValue, I: ToValue, J: ToValue, K: ToValue, L: ToValue, M: ToValue, N: ToValue, O: ToValue, P: ToValue, Q: ToValue, R: ToValue, S: ToValue, T: ToValue, U: ToValue> ToValue 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: ToValue, V: ToValue> ToValue for BTreeMap<K, V>
Available on non-crate feature no-std only.
impl<K: ToValue, V: ToValue> ToValue for BTreeMap<K, V>
Available on non-crate feature
no-std only.Source§impl<T: ToValue> ToValue for LinkedList<T>
Available on non-crate feature no-std only.
impl<T: ToValue> ToValue for LinkedList<T>
Available on non-crate feature
no-std only.