Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DelimFile new_reader and new_writer methods #15

Merged
merged 6 commits into from
Nov 7, 2023

Conversation

jdidion
Copy link
Contributor

@jdidion jdidion commented Nov 7, 2023

Implements #13 - new_reader returns a DelimFileReader instance and new_writer returns a DelimFileWriter instance.

DelimFileReader has a read method for reading one record at at time. It also implements Iterator, and read is really just an alias for next.

DelimFileWriter has a write method for writing one record at a time, and a write_all method for writing all records from an iterator.

DelimFile's convenience functions are re-written in terms of the new structs.

@jdidion jdidion requested review from nh13 and tfenne November 7, 2023 21:11
Copy link
Member

@nh13 nh13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank-you, this looks great!

src/io/mod.rs Show resolved Hide resolved
src/io/mod.rs Outdated Show resolved Hide resolved
@jdidion jdidion merged commit 6e75345 into main Nov 7, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants