fn write(&mut self, string: &[u8]) -> Result<(), Error> {
        if self.stream.is_none() {
            return Err(From::from("Connection closed"));
        }

        self.stream.as_mut().unwrap().write_all(string)?;
        self.stream.as_mut().unwrap().flush()?;

        debug!(
            "Wrote: {}",
            escape_crlf(String::from_utf8_lossy(string).as_ref())
        );
        Ok(())
    }
/// Writes a string to the server
Writes a string to the server
Writes a string to the server
fn write(&mut self, string: &[u8]) -> Result<(), Error> {
        if self.stream.is_none() {
            return Err(From::from("Connection closed"));
        }
        self.stream.as_mut().unwrap().write_all(string)?;
        self.stream.as_mut().unwrap().flush()?;
        debug!(
            "Wrote: {}",
            escape_crlf(String::from_utf8_lossy(string).as_ref())
        );
        Ok(())
    }
fn write ( & mut self , string : & [ u8 ] ) -> Result < ( ) , Error > { if self . stream . is_none ( ) { return Err ( From :: from ( " " ) ) ; } self . stream . as_mut ( ) . unwrap ( ) . write_all ( string ) ? ; self . stream . as_mut ( ) . unwrap ( ) . flush ( ) ? ; debug ! ( " " escape_crlf ( String from_utf8_lossy ( string ) as_ref ( ) ) ) ; Ok ( ( ) ) }
Writes a string to the server
Writes a string to the server
&mut self
string
&[u8]
&mut self
string
&[u8]