pub async fn send<T: Serialize>(&mut self, msg: &T) -> Result<(), Error> {
        let bincode_config = self.bincode_config();

        let serialized_len = bincode_config.serialized_size(msg)?;
        if self.send_chunk.len() as u64 + serialized_len > self.max_chunk_len as u64 {
            self.write_send_chunk().await?;
        }

        bincode_config.serialize_into(&mut self.send_chunk, msg)?;

        Ok(())
    }
/// Send the given message.
///
/// 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.
Send the given message.
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.
Send the given message . 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> {
        let bincode_config = self.bincode_config();
        let serialized_len = bincode_config.serialized_size(msg)?;
        if self.send_chunk.len() as u64 + serialized_len > self.max_chunk_len as u64 {
            self.write_send_chunk().await?;
        }
        bincode_config.serialize_into(&mut self.send_chunk, msg)?;
        Ok(())
    }
pub async fn send < T : Serialize > ( & mut self , msg : & T ) -> Result < ( ) , Error > { let bincode_config = self . bincode_config ( ) ; let serialized_len = bincode_config . serialized_size ( msg ) ? ; if self . send_chunk . len ( ) as u64 + serialized_len > self . max_chunk_len as u64 { self . write_send_chunk ( ) . await ? ; } bincode_config . serialize_into ( & mut self . send_chunk , msg ) ? ; Ok ( ( ) ) }
Send the given message.
Send the given message .
&mut self
msg
&T
&mut self
msg
&T