BurntSushi / BurntSushi/rust-csv

Feature request: please add `invalid_result` deserializer

Open
#345 7 comments 0 reactions 0 assignees View on GitHub
enhancement help-wanted
Dominant language
Rust
Stars
2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

When dealing with [invalid data with serde](https://docs.rs/csv/latest/csv/tutorial/index.html#handling-invalid-data-with-serde), sometimes it is useful to get also invalid fields when present. The current [`invalid_option` deserializer](https://docs.rs/csv/latest/csv/fn.invalid_option.html) discards all invalid fields. It would be convenient to have a similar `invalid_result` deserializer, which returns `Ok(value)` for all valid fields, and `Err(string_field)` for all invalid fields.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.