Moved all encoding and decoding functions onto Codec methods that contain configuration set with a builder pattern on Config structs.

Part of issue #24.
This commit is contained in:
Alex Helfet 2017-12-31 15:29:59 +00:00
commit dd17f1f65d

View file

@ -3,7 +3,6 @@
extern crate framed;
extern crate framed_test_type as lib;
use framed::typed::Sender;
use lib::Test;
use std::io::stdout;
@ -14,6 +13,8 @@ fn main() {
};
eprintln!("test_type/main.rs: Sending sample value: {:#?}", t);
let mut s = Sender::<_, Test>::new(stdout());
let mut s = framed::bytes::Config::default()
.typed::<Test>()
.into_sender(stdout());
s.send(&t).unwrap();
}