Expand description
Conversions between Rust values and Lean objects, chosen by the Lean type.
Several Lean types share one Rust type: Array α and List α are both Vec<T>, and
ByteArray and Array UInt8 are both Vec<u8>. A conversion therefore cannot be found
from the Rust type alone. Generated code names it instead, as a type that implements
Codec and mirrors the Lean type: Array<List<Plain<Nat>>> converts a
Vec<Vec<Nat>> to and from a Lean Array (List Nat).
Structs§
- Array
- Lean’s
Array αas aVec. - Boxed
- A value that the Rust type keeps in a
Box, as recursive types must. - Byte
Array - Lean’s
ByteArrayas aVec<u8>. - Except
- Lean’s
Except ε αas aResult. Lean names the error type first, Rust the value type. - Float
Array - Lean’s
FloatArrayas aVec<f64>. - List
- Lean’s
List αas aVec. - Option
- Lean’s
Option α. - Pair
- Lean’s
α × βas a pair. - Plain
- A type whose Lean counterpart follows from the Rust type: the scalars,
Nat,Int,String.
Traits§
- Codec
- A conversion between a Rust type and the Lean type the implementor stands for.