pub fn write(&mut self, msg: &[u8]) -> Result<(), Error> {
        let encrypted_msg = self.channel.encrypt_message(msg)?.0;
        self.stream.write_all(&encrypted_msg).map_err(|e| {
            Error::Transport(format!(
                "Failed to send encrypted message with TcpStream: {:?}",
                e
            ))
        })
    }
/// Write a message to the other end of the encrypted communication channel.
Write a message to the other end of the encrypted communication channel.
Write a message to the other end of the encrypted communication channel .
pub fn write(&mut self, msg: &[u8]) -> Result<(), Error> {
        let encrypted_msg = self.channel.encrypt_message(msg)?.0;
        self.stream.write_all(&encrypted_msg).map_err(|e| {
            Error::Transport(format!(
                "Failed to send encrypted message with TcpStream: {:?}",
                e
            ))
        })
    }
pub fn write ( & mut self , msg : & [ u8 ] ) -> Result < ( ) , Error > { let encrypted_msg = self . channel . encrypt_message ( msg ) ? . 0 ; self . stream . write_all ( & encrypted_msg ) . map_err ( | e | { Error :: Transport ( format ! ( " " e ) ) } ) }
Write a message to the other end of the encrypted communication channel.
Write a message to the other end of the encrypted communication channel .
&mut self
msg
&[u8]
&mut self
msg
&[u8]