encode

Function encode 

Source
pub fn encode(
    msg: &TextMessage<'_>,
    buf: &mut [u8],
) -> Result<usize, EncodeError>
Expand description

Encode a text message into a caller-provided buffer, returning the number of bytes written.