pub(crate) fn next_string(&mut self) -> Result<String, ParseError> {
        match self.next()? {
            // Both `Simple` and `Bulk` representation may be strings. Strings
            // are parsed to UTF-8.
            //
            // While errors are stored as strings, they are considered separate
            // types.
            Frame::Simple(s) => Ok(s),
            Frame::Bulk(data) => str::from_utf8(&data[..])
                .map(|s| s.to_string())
                .map_err(|_| "protocol error; invalid string".into()),
            frame => Err(format!(
                "protocol error; expected simple frame or bulk frame, got {:?}",
                frame
            )
            .into()),
        }
    }
/// Return the next entry as a string.
///
/// If the next entry cannot be represented as a String, then an error is returned.
Return the next entry as a string.
If the next entry cannot be represented as a String, then an error is returned.
Return the next entry as a string . If the next entry cannot be represented as a String then an error is returned .
pub(crate) fn next_string(&mut self) -> Result<String, ParseError> {
        match self.next()? {
            // Both `Simple` and `Bulk` representation may be strings. Strings
            // are parsed to UTF-8.
            //
            // While errors are stored as strings, they are considered separate
            // types.
            Frame::Simple(s) => Ok(s),
            Frame::Bulk(data) => str::from_utf8(&data[..])
                .map(|s| s.to_string())
                .map_err(|_| "protocol error; invalid string".into()),
            frame => Err(format!(
                "protocol error; expected simple frame or bulk frame, got {:?}",
                frame
            )
            .into()),
        }
    }
pub ( crate ) fn next_string ( & mut self ) -> Result < String , ParseError > { match self . next ( ) ? { // Both `Simple` and `Bulk` representation may be strings. Strings // are parsed to UTF-8. // // While errors are stored as strings, they are considered separate // types. Frame :: Simple ( s ) => Ok ( s ) , Frame :: Bulk ( data ) => str :: from_utf8 ( & data [ .. ] ) . map ( | s | s . to_string ( ) ) . map_err ( | _ | " " . into ( ) ) , frame => Err ( format ! ( " " frame ) . into ( ) ) , } }
Return the next entry as a string.
Return the next entry as a string .
&mut self