pub fn clear(&mut self) -> String {
        let mut rest = Vec::new();
        std::mem::swap(&mut rest, &mut self.buf);

        if let Ok(s) = String::from_utf8(rest) {
            s
        } else {
            String::new()
        }
    }
/// Clears the internal buffer, returning its contents as a string
Clears the internal buffer, returning its contents as a string
Clears the internal buffer returning its contents as a string
pub fn clear(&mut self) -> String {
        let mut rest = Vec::new();
        std::mem::swap(&mut rest, &mut self.buf);
        if let Ok(s) = String::from_utf8(rest) {
            s
        } else {
            String::new()
        }
    }
pub fn clear ( & mut self ) -> String { let mut rest = Vec :: new ( ) ; std :: mem :: swap ( & mut rest , & mut self . buf ) ; if let Ok ( s ) = String :: from_utf8 ( rest ) { s } else { String :: new ( ) } }
Clears the internal buffer, returning its contents as a string
Clears the internal buffer returning its contents as a string
&mut self
&mut self