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§
Sourcefn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
Attempt to serialize the value to ouput.
Sourcefn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
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 ()
impl TopEncodeMulti for ()
fn multi_encode_or_handle_err<O, H>(
&self,
_output: &mut O,
_h: H,
) -> Result<(), H::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
Implementors§
impl TopEncodeMulti for IgnoreValue
impl TopEncodeMulti for PlaceholderInput
impl<T0, T1> TopEncodeMulti for MultiValue2<T0, T1>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
impl<T0, T1, T2> TopEncodeMulti for MultiValue3<T0, T1, T2>
impl<T0, T1, T2, T3> TopEncodeMulti for MultiValue4<T0, T1, T2, T3>
impl<T0, T1, T2, T3, T4> TopEncodeMulti for MultiValue5<T0, T1, T2, T3, T4>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
impl<T0, T1, T2, T3, T4, T5> TopEncodeMulti for MultiValue6<T0, T1, T2, T3, T4, T5>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
impl<T0, T1, T2, T3, T4, T5, T6> TopEncodeMulti for MultiValue7<T0, T1, T2, T3, T4, T5, T6>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
impl<T0, T1, T2, T3, T4, T5, T6, T7> TopEncodeMulti for MultiValue8<T0, T1, T2, T3, T4, T5, T6, T7>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> TopEncodeMulti for MultiValue9<T0, T1, T2, T3, T4, T5, T6, T7, T8>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TopEncodeMulti for MultiValue10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
T11: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
T11: TopEncodeMulti,
T12: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
T11: TopEncodeMulti,
T12: TopEncodeMulti,
T13: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
T11: TopEncodeMulti,
T12: TopEncodeMulti,
T13: TopEncodeMulti,
T14: TopEncodeMulti,
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>where
T0: TopEncodeMulti,
T1: TopEncodeMulti,
T2: TopEncodeMulti,
T3: TopEncodeMulti,
T4: TopEncodeMulti,
T5: TopEncodeMulti,
T6: TopEncodeMulti,
T7: TopEncodeMulti,
T8: TopEncodeMulti,
T9: TopEncodeMulti,
T10: TopEncodeMulti,
T11: TopEncodeMulti,
T12: TopEncodeMulti,
T13: TopEncodeMulti,
T14: TopEncodeMulti,
T15: TopEncodeMulti,
impl<T> TopEncodeMulti for OptionalValue<T>where
T: TopEncodeMulti,
impl<T> TopEncodeMulti for MultiValueVec<T>where
T: TopEncodeMulti,
impl<T> TopEncodeMulti for Twhere
T: TopEncode,
All single top encode types also work as multi-value encode types.