deltanedas 2 роки тому
батько
коміт
25bfceb4b1
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      README.md

+ 2 - 1
README.md

@@ -5,6 +5,7 @@ Lightweight and clean alternative to serde, focusing on writing to and from `Vec
 ```rs
 #[derive(Io)]
 struct Thingy {
+	#[io(len(u16))]
 	name: String,
 	kind: ThingyKind,
 	#[io(ignore)]
@@ -14,7 +15,7 @@ struct Thingy {
 #[derive(Io)]
 enum ThingyKind {
 	Normal,
-	Special(String)
+	Special(#[io(len(u8))] String)
 }
 
 let thingy = Thingy {