Improve documentation on duplex.rs

Adding example and short documentation for methods.
I am not a Vim ninja. :p