Rust implementation of a High-level Data Link Control (HDLC) library with support of the IEEE standard.
Add hdlc
to Cargo.toml
toml
[dependencies]
hdlc = "^0.1.1"
or
toml
[dependencies.hdlc]
git = "https://github.com/CLomanno/hdlc-rust"
Add this to crate root
rust
extern crate hdlc;
```rust extern crate hdlc; use hdlc::{SpecialChars, encode};
// Set up your vector of bytes and generate your Special Characters
let msg: Vec
// Encode your message let result = encode(msg, chars);
assert!(result.isok()); asserteq!(result.unwrap(), cmp); ```
```rust extern crate hdlc; use hdlc::{SpecialChars, encode};
let msg: Vec
let result = encode(msg, chars);
assert!(result.isok()); asserteq!(result.unwrap(), cmp) ```
```rust extern crate hdlc; use hdlc::{SpecialChars, decode};
let chars = SpecialChars::default();
let msg: Vec
let result = decode(msg, chars);
assert!(result.isok()); asserteq!(result.unwrap(), cmp); ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.