Struct bincode::rustc_serialize::DecoderReader
[−]
[src]
pub struct DecoderReader<'a, R: 'a> { // some fields omitted }
A Decoder that reads bytes from a buffer.
This struct should rarely be used.
In most cases, prefer the decode_from
function.
let dr = bincode::rustc_serialize::DecoderReader::new(&mut some_reader, SizeLimit::Infinite); let result: T = Decodable::decode(&mut dr); let bytes_read = dr.bytes_read();
Methods
impl<'a, R: Read> DecoderReader<'a, R>
fn new(r: &'a mut R, size_limit: SizeLimit) -> DecoderReader<'a, R>
fn bytes_read(&self) -> u64
Returns the number of bytes read from the contained Reader.