Skip to content

Add example for writing to/reading from file with Vec<T> #572

@LanHikari22

Description

@LanHikari22

Objective

It would be good to be able to use RON not just for config, but also to quickly write csv-like data. Currently, csv/serde does not support nested enums with fields, but RON does, so it can be an alternative solution.

Solution

I have a PR incoming for this. My strategy was to use a simple separator text file format with \n=RON_MGC=\n .

To test quickly

This also corresponds with repro003, which can be run quickly:

git clone https://github.com/LanHikari22/rs_repro.git
cd rs_repro
cargo run --features "repro003"

Optional Context

The development journal this is a part of can be found here.

Thanks!
Lan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions