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:
parent
311040f46c
commit
dd17f1f65d
1 changed files with 569 additions and 332 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue