Closed lucatrv closed 6 months ago
I'm not, at first glance, convinced of the general utility of this.
However, I'll consider it and if anyone else thinks this would be useful then a +1 or "me too" comment will help persuade me.
Ok. It seems like you have a plan you are working to.
I've added this to main. Let me know how you get on.
It is undocumented for now. I'll add that later. Done.
Thanks @jmcnamara , yes I will let you know if this feature can be added to rust-csv
and calamine
, as it will ease management of invalid field formats.
This feature has been pushed to crates.io in rust_xlsxwriter
v0.60.0.
Feature Request
Currently
IntoExcelData
supportsOption<T>
, which can be used when a value maybe present or not. However often when dealing with tabular data we need to define fallback types, for instance a column could normally contain anf64
but may sometimes contain aString
. I think the best way to deal with this very common occurrence is to useResult<f64, String>
. Of course also other use cases can be envisioned for aResult<T, E>
type. Therust_xlsxwriter::Worksheet::write*
methods should correctly writeResult<T, E>
if bothT
andE
are supported types.