Explorar el Código

update readme

deltanedas hace 2 años
padre
commit
25bfceb4b1
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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 {