Crates.io | udsv |
lib.rs | udsv |
version | 0.1.1 |
source | src |
created_at | 2023-09-21 16:37:47.973534 |
updated_at | 2023-09-21 16:37:47.973534 |
description | A serde library for the UNIX Delimiter Separated Values format |
homepage | |
repository | https://github.com/MarkTuddenham/udsv/tree/master/udsv_serde |
max_upload_size | |
id | 979655 |
size | 38,843 |
M. Tuddenham
August 2023
UDSV SerDe
This is a rust serde library for the UNIX Delimiter Separated Values (UDSV) file format.
record_to_str
, and record_from_str
handle just one record. In the future
there will be to_str
and from_str
to handle a whole file of records.
While Numbers/Enums/Structs/Tuples aren't in the original specification, an attempt has been made to best (de)serialise them here.
3.1 Numbers
To do.
3.2 Enums Enums are always externally tagged.
3.3 Struct Structs are flattened, and the fields are colon-separated. Structs are never tagged.
3.4 Tuples
Tuples are (de)serialised identically to lists.
3.5 Options
None
is serialised as the empty string, Some(x)
is just x
serialised.
Options are lossy, i.e. there is no distinction between Some(())
,
Some("")
, and None
.
3.6 Booleans
Booleans are serialised as the strings "true" and "false".
Allow derseriliasing into a &str - https://serde.rs/lifetimes.html
Disallow nesting
floats
signed ints
int/float overflow