BorrowDecoder

Trait BorrowDecoder 

Source
pub trait BorrowDecoder<'de>: Decoder {
    type BR: BorrowReader<'de>;

    // Required method
    fn borrow_reader(&mut self) -> &mut Self::BR;
}
Expand description

Any source that can decode basic types. This type is most notably implemented for Decoder.

This is an extension of Decode that can also return borrowed data.

Required Associated Types§

Source

type BR: BorrowReader<'de>

The concrete BorrowReader type

Required Methods§

Source

fn borrow_reader(&mut self) -> &mut Self::BR

Rerturns a mutable reference to the borrow reader

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<'de, T> BorrowDecoder<'de> for &mut T
where T: BorrowDecoder<'de>,

Source§

type BR = <T as BorrowDecoder<'de>>::BR

Source§

fn borrow_reader(&mut self) -> &mut Self::BR

Implementors§

Source§

impl<'de, R: BorrowReader<'de>, C: Config, Context> BorrowDecoder<'de> for DecoderImpl<R, C, Context>

Source§

type BR = R