pub fn with_buf_bulk(reader: BufReader<R>) -> Self {
        Decoder {
            buf_bulk: true,
            reader: reader,
        }
    }
/// Creates a Decoder instance with given BufReader for decoding the RESP buffers.
/// The instance will decode bulk value to buffer bulk.
/// # 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::with_buf_bulk(BufReader::new(buf.as_slice()));
/// // Always decode "$" buffers to Value::BufBulk even if feed Value::Bulk buffers
/// assert_eq!(decoder.decode().unwrap(), Value::BufBulk("Hello".to_string().into_bytes()));
/// ```
Creates a Decoder instance with given BufReader for decoding the RESP buffers.
The instance will decode bulk value to buffer bulk.
Creates a Decoder instance with given BufReader for decoding the RESP buffers . The instance will decode bulk value to buffer bulk .
pub fn with_buf_bulk(reader: BufReader<R>) -> Self {
        Decoder {
            buf_bulk: true,
            reader: reader,
        }
    }
pub fn with_buf_bulk ( reader : BufReader < R > ) -> Self { Decoder { buf_bulk : true , 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::with_buf_bulk(BufReader::new(buf.as_slice()));
Always decode "$" buffers to Value::BufBulk even if feed Value::Bulk buffers
assert_eq!(decoder.decode().unwrap(), Value::BufBulk("Hello".to_string().into_bytes()));
```
let value = Value :: Bulk ( " Hello " . to_string () ) ; let buf = value . encode () ; let mut decoder = Decoder :: with_buf_bulk ( BufReader :: new ( buf . as_slice () )) ; Always decode " $ " buffers to Value :: BufBulk even if feed Value :: Bulk buffers assert_eq! ( decoder . decode () . unwrap () Value :: BufBulk ( " Hello " . to_string () . into_bytes () )) ; ` ` `