Trait ink::Output

source ·
pub trait Output<const IS_RESULT: bool, const HANDLE_STATUS: bool, T, E>: OutputSealed {
    type ReturnType;
}
Expand description

Only implemented for ValueReturned.

Used to deduce the correct return type of a chain extension method at compile time based on 2 flags: const IS_RESULT: bool and const HANDLE_STATUS: bool.

If IS_RESULT is set to false and HANDLE_STATUS is true, then type ReturnType = Result<T, E>. Otherwise type ReturnType = T.

Required Associated Types§

Implementors§

source§

impl<T, E> Output<false, false, T, E> for ValueReturned

§

type ReturnType = T

source§

impl<T, E> Output<false, true, T, E> for ValueReturned

§

type ReturnType = Result<T, E>

source§

impl<T, E> Output<true, false, T, E> for ValueReturned

§

type ReturnType = T

source§

impl<T, E> Output<true, true, T, E> for ValueReturned

§

type ReturnType = T