Expand description
A crate to implement the TLDMP protocol. Example usage:
fn main() {
let mut output: Vec<u8> = Vec::new();
tld_msg::send(&mut output, 1, &mut "Hey!".as_bytes()).unwrap();
let mut input = &output[..];
let msg = tld_msg::receive(&mut input).unwrap();
println!("{:#?}", output);
println!("{:#?}\n{}", msg, String::from_utf8(msg.content.clone()).unwrap());
}
Structs§
- Message
- Struct for storing a message