/// Encodes RESP value to RESP binary buffer.
/// # Examples
/// ```
/// # use self::resp::{Value, encode};
/// let val = Value::String("OK".to_string());
/// assert_eq!(encode(&val), vec![43, 79, 75, 13, 10]);
/// ```
Encodes RESP value to RESP binary buffer.
Encodes RESP value to RESP binary buffer .
pub fn encode(value: &Value) -> Vec<u8> {
    let mut res: Vec<u8> = Vec::with_capacity(1024);
    buf_encode(value, &mut res);
    res
}
pub fn encode ( value : & Value ) -> Vec < u8 > { let mut res : Vec < u8 > = Vec :: with_capacity ( 1024 ) ; buf_encode ( value , & mut res ) ; res }
Encodes RESP value to RESP binary buffer.
Encodes RESP value to RESP binary buffer .
value
&Value
examples
None
use self::resp::{value, encode};
None