pub struct Reader;
Expand description
Reads the TcpStream buffer and parse the result according to the redis protocol specification building either RedisResult or RedisError.
Implementations§
Source§impl Reader
impl Reader
Sourcepub fn read(
buffer: &mut BufReader<TcpStream>,
) -> Result<RedisResult, RedisError>
pub fn read( buffer: &mut BufReader<TcpStream>, ) -> Result<RedisResult, RedisError>
Read the stream expecting one response. Determine the type of the response
Sourcepub fn read_pipeline(
buffer: &mut BufReader<TcpStream>,
cmd_nb: usize,
) -> Result<Vec<RedisResult>, RedisError>
pub fn read_pipeline( buffer: &mut BufReader<TcpStream>, cmd_nb: usize, ) -> Result<Vec<RedisResult>, RedisError>
Read the stream and expect several responses
Auto Trait Implementations§
impl Freeze for Reader
impl RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnwindSafe for Reader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more