Skip to main content

AsDecoder

Trait AsDecoder 

Source
pub unsafe trait AsDecoder<'de> {
    type Decoder: Decoder<'de>;

    // Required method
    fn as_decoder(&'de mut self) -> Self::Decoder;
}
Expand description

A type that can be borrowed as a decoder.

§Safety

Moving a value of this type must not invalidate any references to chunks returned from take_chunks. This usually means that the chunks returned from take_chunks point to non-local memory (e.g. on the heap, elsewhere on the stack).

Required Associated Types§

Source

type Decoder: Decoder<'de>

The borrowed decoder type.

Required Methods§

Source

fn as_decoder(&'de mut self) -> Self::Decoder

Borrowes this value as a decoder.

Implementations on Foreign Types§

Source§

impl<'de> AsDecoder<'de> for Vec<Uint64>

Source§

type Decoder = &'de mut [Uint64]

Source§

fn as_decoder(&'de mut self) -> <Vec<Uint64> as AsDecoder<'de>>::Decoder

Implementors§

Source§

impl<'de> AsDecoder<'de> for Buffer

Source§

impl<'de, T> AsDecoder<'de> for Body<T>
where T: Transport,