Skip to main content

LeanRepr

Trait LeanRepr 

Source
pub unsafe trait LeanRepr {
    type Value;
}
Expand description

A Rust type that names a Lean type whose values a Lean handle can hold.

§Safety

to_obj must return an owned object of the Lean type and from_obj must read one without taking ownership; the type must be data (no closures, thunks, tasks or references), since handles of it are shared between threads. Generated modules implement it for their types.

Required Associated Types§

Source

type Value

The Rust value of the Lean type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LeanRepr for ()

Source§

impl LeanRepr for String

Source§

impl LeanRepr for bool

Source§

impl LeanRepr for char

Source§

impl LeanRepr for f32

Source§

impl LeanRepr for f64

Source§

impl LeanRepr for i8

Source§

impl LeanRepr for i16

Source§

impl LeanRepr for i32

Source§

impl LeanRepr for i64

Source§

impl LeanRepr for isize

Source§

impl LeanRepr for u8

Source§

impl LeanRepr for u16

Source§

impl LeanRepr for u32

Source§

impl LeanRepr for u64

Source§

impl LeanRepr for usize

Source§

impl<A: LeanRepr, B: LeanRepr> LeanRepr for (A, B)

Source§

type Value = (<A as LeanRepr>::Value, <B as LeanRepr>::Value)

Source§

impl<T: LeanRepr, E: LeanRepr> LeanRepr for Result<T, E>

Source§

type Value = Result<<T as LeanRepr>::Value, <E as LeanRepr>::Value>

Source§

impl<T: LeanRepr> LeanRepr for Option<T>

Implementors§