20 releases (5 stable)

new 1.2.1 Jun 19, 2021
1.0.2 Jun 18, 2021
1.0.0 Apr 22, 2021
0.3.0 Feb 24, 2021
0.1.10 Dec 22, 2020
Download history 15/week @ 2021-02-25 22/week @ 2021-03-04 5/week @ 2021-03-11 6/week @ 2021-03-18 72/week @ 2021-03-25 6/week @ 2021-04-01 41/week @ 2021-04-08 61/week @ 2021-04-15 50/week @ 2021-04-22 10/week @ 2021-04-29 5/week @ 2021-05-06 23/week @ 2021-05-13 7/week @ 2021-05-20 9/week @ 2021-05-27 9/week @ 2021-06-03 27/week @ 2021-06-10

120 downloads per month
Used in 2 crates

MIT/Apache

65KB
2K SLoC

#IO buffer write reader, support bit7 and normal mode, contain error check.

Examples

  
  let mut data = Data::new();
   
  data.write_to(&"adfadfaf");
  let v = data.get::<String>()?;
  assert_eq!(v, "adfadfaf");  
 
  // le
  data.write_to_le(&34u8);
  let v = data.get_le::<u8>()?;
  assert_eq!(v, 34u8);

  //bit7  
  let mut hashmap=HashMap::new();
  hashmap.insert(1,"123123".to_string());
  hashmap.insert(2,"123123".to_string());
  data.write_to_bit7(&hashmap);

  let (_,v)=data.get_bit7::<HashMap<i32,String>>()?;
  assert_eq!(v, hashmap);

Dependencies

~400–710KB
~14K SLoC