Skip to content

Documentation: Add StringRecord indexing example to readme/cookbook #241

@multimeric

Description

@multimeric

This is just a documentation suggestion so I'm not following the usual issue format if that's okay.

As a new user of this crate as of today, I noticed that reading through the main examples in the index and also the cookbook only interact with the records by using dbg!. This has the downside in that it doesn't show how to actually use a record in a real-life situation, which I believe is indexing it using .get() or [] to get at each of the "cells" in the CSV. I find the Serde example is quite clear because it's evident that you end up with an instance of Record, which has clearly defined types, it's only the non-Serde example where I wasn't sure what I was working with.

So my suggestion is to show this normal indexing behaviour in the main examples, and also link to the StringRecord examples for more detail.

I'm happy to write up a PR for this if you agree..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions