pub trait DecodeCallResult<'lean>: Sized + SealedResult {
type Output;
type CRepr: Copy;
}Expand description
How to decode an owned Lean call result into a Rust value.
Sealed via SealedResult; downstream cannot implement it.
Two implementors:
- blanket
impl<T: LeanAbi<'lean>> DecodeCallResult<'lean> for T— the pure path;CRepr = T::CRepr,Output = T;decode_cisT::from_c(c, rt). - special
impl<T: TryFromLean<'lean>> DecodeCallResult<'lean> for LeanIo<T>— the IO path;CRepr = *mut lean_object(the IO result wrapper),Output = T;decode_cwraps the pointer inObj, runsdecode_io, thenT::try_from_lean.
Coherence holds because LeanIo<T> does not implement LeanAbi,
so the blanket impl does not match it.
Required Associated Types§
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.