multiversx_sc_codec

Trait TopEncodeMulti

Source
pub trait TopEncodeMulti: Sized {
    // Provided methods
    fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>
       where O: TopEncodeMultiOutput { ... }
    fn multi_encode_or_handle_err<O, H>(
        &self,
        output: &mut O,
        h: H,
    ) -> Result<(), H::HandledErr>
       where O: TopEncodeMultiOutput,
             H: EncodeErrorHandler { ... }
}

Provided Methods§

Source

fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>

Attempt to serialize the value to ouput.

Source

fn multi_encode_or_handle_err<O, H>( &self, output: &mut O, h: H, ) -> Result<(), H::HandledErr>

Version of top_encode that can handle errors as soon as they occur. For instance in can exit immediately and make sure that if it returns, it is a success. By not deferring error handling, this can lead to somewhat smaller bytecode.

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.

Implementations on Foreign Types§

Source§

impl TopEncodeMulti for ()

Implementors§

Source§

impl TopEncodeMulti for IgnoreValue

Source§

impl TopEncodeMulti for PlaceholderInput

Source§

impl<T0, T1> TopEncodeMulti for MultiValue2<T0, T1>

Source§

impl<T0, T1, T2> TopEncodeMulti for MultiValue3<T0, T1, T2>

Source§

impl<T0, T1, T2, T3> TopEncodeMulti for MultiValue4<T0, T1, T2, T3>

Source§

impl<T0, T1, T2, T3, T4> TopEncodeMulti for MultiValue5<T0, T1, T2, T3, T4>

Source§

impl<T0, T1, T2, T3, T4, T5> TopEncodeMulti for MultiValue6<T0, T1, T2, T3, T4, T5>

Source§

impl<T0, T1, T2, T3, T4, T5, T6> TopEncodeMulti for MultiValue7<T0, T1, T2, T3, T4, T5, T6>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> TopEncodeMulti for MultiValue8<T0, T1, T2, T3, T4, T5, T6, T7>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> TopEncodeMulti for MultiValue9<T0, T1, T2, T3, T4, T5, T6, T7, T8>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TopEncodeMulti for MultiValue10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TopEncodeMulti for MultiValue11<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TopEncodeMulti for MultiValue12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TopEncodeMulti for MultiValue13<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TopEncodeMulti for MultiValue14<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TopEncodeMulti for MultiValue15<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TopEncodeMulti for MultiValue16<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>

Source§

impl<T> TopEncodeMulti for OptionalValue<T>
where T: TopEncodeMulti,

Source§

impl<T> TopEncodeMulti for MultiValueVec<T>
where T: TopEncodeMulti,

Source§

impl<T> TopEncodeMulti for T
where T: TopEncode,

All single top encode types also work as multi-value encode types.