pub async fn send<T: Serialize>(&mut self, msg: &T) -> Result<(), Error> {
        self.finish_write().await?;

        self.write_pos = 0;
        self.write_end = 0;

        let bincode_config = self.bincode_config();
        let mut w = &mut self.write_buffer[2..];
        bincode_config.serialize_into(&mut w, msg)?;

        let remaining = w.len();
        self.write_end = self.write_buffer.len() - remaining;
        LittleEndian::write_u16(&mut self.write_buffer[0..2], (self.write_end - 2) as u16);
        self.finish_write().await?;

        Ok(())
    }
/// Write the given message to the reliable channel.
///
/// In order to ensure that messages are sent in a timely manner, `flush` must be called after
/// calling this method.  Without calling `flush`, any pending writes will not be sent until the
/// next automatic sender task wakeup.
///
/// This method is cancel safe, it will never partially send a message, though canceling it may
/// or may not buffer a message to be sent.
Write the given message to the reliable channel.
In order to ensure that messages are sent in a timely manner, `flush` must be called after
calling this method.  Without calling `flush`, any pending writes will not be sent until the
next automatic sender task wakeup.

This method is cancel safe, it will never partially send a message, though canceling it may
or may not buffer a message to be sent.
Write the given message to the reliable channel . In order to ensure that messages are sent in a timely manner ` flush ` must be called after calling this method . Without calling ` flush ` any pending writes will not be sent until the next automatic sender task wakeup . This method is cancel safe it will never partially send a message though canceling it may or may not buffer a message to be sent .
pub async fn send<T: Serialize>(&mut self, msg: &T) -> Result<(), Error> {
        self.finish_write().await?;
        self.write_pos = 0;
        self.write_end = 0;
        let bincode_config = self.bincode_config();
        let mut w = &mut self.write_buffer[2..];
        bincode_config.serialize_into(&mut w, msg)?;
        let remaining = w.len();
        self.write_end = self.write_buffer.len() - remaining;
        LittleEndian::write_u16(&mut self.write_buffer[0..2], (self.write_end - 2) as u16);
        self.finish_write().await?;
        Ok(())
    }
pub async fn send < T : Serialize > ( & mut self , msg : & T ) -> Result < ( ) , Error > { self . finish_write ( ) . await ? ; self . write_pos = 0 ; self . write_end = 0 ; let bincode_config = self . bincode_config ( ) ; let mut w = & mut self . write_buffer [ 2 .. ] ; bincode_config . serialize_into ( & mut w , msg ) ? ; let remaining = w . len ( ) ; self . write_end = self . write_buffer . len ( ) - remaining ; LittleEndian :: write_u16 ( & mut self . write_buffer [ 0 .. 2 ] , ( self . write_end - 2 ) as u16 ) ; self . finish_write ( ) . await ? ; Ok ( ( ) ) }
Write the given message to the reliable channel.
Write the given message to the reliable channel .
&mut self
msg
&T
&mut self
msg
&T