# RoSV - Rows of Serial Values implementation for Rust
I didn't really like the version included in the
[RSV Challenge repo](https://github.com/Stenway/RSV-Challenge), so I made my
own.
This crate adds functionality to `Vec`s and `Vec<Vec>`s for `Option` and non-`Option` entries of:
* `String`
* `&str`
* `Rc<str>`
* `Arc<str>`
This crate also adds functionality to `Vec<u8>` for deserialization:
Bare functions for serialization and deserialization are available in
`rosv::serialization` as well.
```rust
use rosv::{DeserializeRoSV, SerializeRoSV};
// Sample data
let rows = vec![
vec![Some("Hello"), Some("🌎"), None, Some("")],
vec![Some("A\0B\nC"), Some("Test 𝄞")],
vec![],
vec![Some("")],
];
// Return vec as a u8 stream readable by the rosv deserializer.
let stream = rows.serialize_rosv().expect("Now errors when given reserved bytes");
// Consume a stream and deserialize to a new vec.
let data = stream.deserialize_rosv().expect("Bad utf-8 in stream, probably?");
```