pub fn new(reader: BufReader<R>) -> Self {
        Decoder {
            buf_bulk: false,
            reader: reader,
        }
    }
/// Creates a Decoder instance with given BufReader for decoding the RESP buffers.
/// # Examples
/// ```
/// # use std::io::BufReader;
/// # use self::resp::{Decoder, Value};
///
/// let value = Value::Bulk("Hello".to_string());
/// let buf = value.encode();
/// let mut decoder = Decoder::new(BufReader::new(buf.as_slice()));
/// assert_eq!(decoder.decode().unwrap(), Value::Bulk("Hello".to_string()));
/// ```
Creates a Decoder instance with given BufReader for decoding the RESP buffers.
Creates a Decoder instance with given BufReader for decoding the RESP buffers .
pub fn new(reader: BufReader<R>) -> Self {
        Decoder {
            buf_bulk: false,
            reader: reader,
        }
    }
pub fn new ( reader : BufReader < R > ) -> Self { Decoder { buf_bulk : false , reader : reader , } }
Creates a Decoder instance with given BufReader for decoding the RESP buffers.
Creates a Decoder instance with given BufReader for decoding the RESP buffers .
reader
BufReader<R>
reader
BufReader<R>
examples
None
use std::io::bufreader;
None
use self::resp::{decoder, value};
let value = Value::Bulk("Hello".to_string());
let buf = value.encode();
let mut decoder = Decoder::new(BufReader::new(buf.as_slice()));
assert_eq!(decoder.decode().unwrap(), Value::Bulk("Hello".to_string()));
```
let value = Value :: Bulk ( " Hello " . to_string () ) ; let buf = value . encode () ; let mut decoder = Decoder :: new ( BufReader :: new ( buf . as_slice () )) ; assert_eq! ( decoder . decode () . unwrap () Value :: Bulk ( " Hello " . to_string () )) ; ` ` `