Trait evm_coder::Contract

source ·
pub trait Contract {
    type Error: From<&'static str>;
    type WithPostInfo<T>;
    type Result<T, E>;

    // Required methods
    fn map_post<I, O>(
        v: Self::WithPostInfo<I>,
        mapper: impl FnOnce(I) -> O
    ) -> Self::WithPostInfo<O>;
    fn with_default_post<T>(v: T) -> Self::WithPostInfo<T>;
}
Expand description

Contract configuration

Required Associated Types§

source

type Error: From<&'static str>

Contract error type

source

type WithPostInfo<T>

Wrapper for Result Ok/Err value

source

type Result<T, E>

Return value of Callable, expected to be of core::result::Result type

Required Methods§

source

fn map_post<I, O>( v: Self::WithPostInfo<I>, mapper: impl FnOnce(I) -> O ) -> Self::WithPostInfo<O>

Map WithPostInfo value

source

fn with_default_post<T>(v: T) -> Self::WithPostInfo<T>

Wrap value with default post info

Implementors§