pub async fn send<T: Serialize>(&mut self, msg: &T) -> Result<(), SendError> {
        let bincode_config = self.bincode_config();
        let mut w = &mut self.buffer[..];
        bincode_config
            .serialize_into(&mut w, msg)
            .map_err(SendError::BincodeError)?;
        let remaining = w.len();
        let written = self.buffer.len() - remaining;
        Ok(self.channel.send(&self.buffer[0..written]).await?)
    }
/// Write the given serializable message type to the channel.
///
/// Messages are coalesced into larger packets before being sent, so in order to guarantee that
/// the message is actually sent, you must call `flush`.
///
/// 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 serializable message type to the channel.
Messages are coalesced into larger packets before being sent, so in order to guarantee that
the message is actually sent, you must call `flush`.

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 serializable message type to the channel . Messages are coalesced into larger packets before being sent so in order to guarantee that the message is actually sent you must call ` flush ` . 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<(), SendError> {
        let bincode_config = self.bincode_config();
        let mut w = &mut self.buffer[..];
        bincode_config
            .serialize_into(&mut w, msg)
            .map_err(SendError::BincodeError)?;
        let remaining = w.len();
        let written = self.buffer.len() - remaining;
        Ok(self.channel.send(&self.buffer[0..written]).await?)
    }
pub async fn send < T : Serialize > ( & mut self , msg : & T ) -> Result < ( ) , SendError > { let bincode_config = self . bincode_config ( ) ; let mut w = & mut self . buffer [ .. ] ; bincode_config . serialize_into ( & mut w , msg ) . map_err ( SendError :: BincodeError ) ? ; let remaining = w . len ( ) ; let written = self . buffer . len ( ) - remaining ; Ok ( self . channel . send ( & self . buffer [ 0 .. written ] ) . await ? ) }
Write the given serializable message type to the channel.
Write the given serializable message type to the channel .
&mut self
msg
&T
&mut self
msg
&T