Trait bincode::de::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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, 'de, T> BorrowDecoder<'de> for &'a mut T
where T: BorrowDecoder<'de>,

§

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> BorrowDecoder<'de> for DecoderImpl<R, C>

§

type BR = R