multiversx_sc_codec

Function try_cast_execute_or_else

Source
pub fn try_cast_execute_or_else<T, U, R, If, Else>(
    t: T,
    exec_if: If,
    exec_else: Else,
) -> R
where T: 'static, U: 'static, R: 'static, If: FnOnce(U) -> R, Else: FnOnce(T) -> R,