Comments (8)
@Turbo87 - I think it's more idiomatic to make it impossible to create invalid record structs - every sane instance of a record struct has a single well defined string representation.
@estk - I started having a look at implementing this over the weekend, I have just opened a WIP PR (#15) to track it.
from igc-rs.
I hadn't thought of that yet, but you're right that it would be fairly straightforward to add. I'm happy to do so, though feel free to open a PR :)
from igc-rs.
@estk do you want to look into that?
from igc-rs.
On further thought, implementing formatters for the various record types will actually help with adding property testing, as it enables property tests of the form format!("{}", rec).parse::<Record>() == rec
.
from igc-rs.
yep, although I'm wondering if the formatters should return Result to in case of invalid values 🤔
from igc-rs.
@Turbo87 @Joey9801 I'd be happy to look into this, might be a few weeks though.
from igc-rs.
I think it's more idiomatic to make it impossible to create invalid record structs - every sane instance of a record struct has a single well defined string representation.
yeah, that makes sense to me. just wondering how to implement that. are you thinking about a builder pattern kind of thing?
from igc-rs.
Implemented in #15
from igc-rs.
Related Issues (10)
- Is this a fork of rust-igc? HOT 3
- Old A record format? HOT 2
- Date uses 2000+ years HOT 1
- B record does not allow negative altitudes HOT 3
- Use `proptest` for fuzzing
- Parsing an entire IGC file HOT 2
- Implement Error for ParseError HOT 1
- Reason for not implementing common Rust traits HOT 5
- Republish to crates.io HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from igc-rs.