pub async fn send_text(&self, s: String) -> Result<usize> {
        self.ensure_open()?;

        let data_channel = self.data_channel.lock().await;
        if let Some(dc) = &*data_channel {
            Ok(dc.write_data_channel(&Bytes::from(s), true).await?)
        } else {
            Err(Error::ErrClosedPipe)
        }
    }
/// send_text sends the text message to the DataChannel peer
send_text sends the text message to the DataChannel peer
send_text sends the text message to the DataChannel peer
pub async fn send_text(&self, s: String) -> Result<usize> {
        self.ensure_open()?;
        let data_channel = self.data_channel.lock().await;
        if let Some(dc) = &*data_channel {
            Ok(dc.write_data_channel(&Bytes::from(s), true).await?)
        } else {
            Err(Error::ErrClosedPipe)
        }
    }
pub async fn send_text ( & self , s : String ) -> Result < usize > { self . ensure_open ( ) ? ; let data_channel = self . data_channel . lock ( ) . await ; if let Some ( dc ) = & * data_channel { Ok ( dc . write_data_channel ( & Bytes :: from ( s ) , true ) . await ? ) } else { Err ( Error :: ErrClosedPipe ) } }
send_text sends the text message to the DataChannel peer
send_text sends the text message to the DataChannel peer
&self
s
String