Small serialization library for Rust

deltanedas 9d8e640ceb up преди 3 години
orio-derive 4c0a446f01 troll преди 3 години
src 785bdc4f6c add time io impls преди 3 години
.gitignore 574f41d36b first commit преди 3 години
Cargo.toml 9d8e640ceb up преди 3 години
LICENSE a0ef58e420 ready for publish преди 3 години
README.md a0ef58e420 ready for publish преди 3 години

README.md

Orio

Lightweight and clean alternative to serde, focusing on writing to and from Vec<u8>s.

#[derive(Io)]
struct Thingy {
	name: String,
	kind: ThingyKind,
	#[io(ignore)]
	debug: String
}

#[derive(Io)]
enum ThingyKind {
	Normal,
	Special(String)
}

let thingy = Thingy {
	name: "thing".to_owned(),
	kind: ThingyKind::Normal,	
	debug: "not written".to_owned()
}
let mut bytes = vec![];
thingy.write(&mut bytes);

Named after the cookie :)

License

MIT license