mllp-rs
mllp-rs is an MLLP implementation in Rust, for the HL7 file standard. It encapsulates the HL7 file in network transmissions. The library provide utilities for encoding and decoding an encapsulated HL7 file. It also provides helpers to generate MLLP ACK and MLLP NAK.
Install
Put this in your Cargo.toml under [dependencies]:
= "0.1.0"
Get started
To encode an HL7 file use MllpCodec::encode(), to decode use MllpCodec::decode().
Client side code might look like this:
use *;
use TcpStream;
use MllpCodec;
// Client side
let mut stream = connect?;
let _ = stream.write;
Server side code might look like this:
use *;
use TcpListener;
use MllpCodec;
let mut listener = bind.unwrap;
for stream in listener.incoming
Misc
You might want to check out also hl7-mllp-codec !