tld_msg 0.1.0

A library for a dead-simple messaging protocol.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented3 out of 4 items with examples
  • Size
  • Source code size: 4.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AlmaemberTheGreat

tld_msg

This is a simple crate for the TLDMP protocol. There isn't much else to say about it.

It's extremely simplistic. The source code is about 40 lines.

Here's an example, though:

mod lib;

fn main() {
    let mut output: Vec<u8> = Vec::new();

    lib::send(&mut output, 1, &mut "Hey!".as_bytes()).unwrap();
    let mut input = &output[..];
    let msg = lib::receive(&mut input).unwrap();

    println!("{:#?}", output);
    println!("{:#?}\n{}", msg, String::from_utf8(msg.content.clone()).unwrap());
}