Stdto
stdto
provides a set of functional traits for conversion between various data representations.
| Examples | Docs | Latest Note |
toml
stdto = "0.3.0"
How to
```rust // #[stdto::bytes(endian = "little")]
struct Test {
a: u32,
b: String,
c: [u8; 32],
d: Vec
bytes = test.tobytes(); Test::frombytes(&bytes); ```
```rust
struct Test { ... }
test.to_hash::
```rust
// AsRef
hex = bytes.tohex();
Vec::
let mut arr = [0u8; 32]; arr.copyfromhex(hex); ```