Module data_reader::reader

source ·
Expand description

Contains all of the functions related to the different readers that will be generated.

Re-exports

Modules

  • Contains various float type readers
  • Contains various integer type readers
  • Contains the functions that will parse a file and return a RawReaderResults
  • Contains a couple functions that are useful for parsing files
  • Contains various primitive type readers that don’t fit into the other reader modules
  • Contains the results from parse_txt or load_txt!
  • Contains various unsigned integer type readers

Macros

  • load_txt! reads in a data file that is made up of any type data that supports FromStr trait. If this assumption is not made then the parser will fail during the conversion between &u8 to the type. It can also fail in a number of other ways related to invalid parameters or the data file having malformed fields. These errors are percolated up to whatever is calling this in the form of the Error type. One should therefore check to make sure no errors are obtained when examining the file. If a malformed field is seen the error does contain information about what line number of the data file has the malformed field. Input - f is simply the location of the file. params is ReaderParams structure. An example for what this looks like can be found in the test directory. type - the data type we’ll be using Output - A Result type that either contains a ReaderResults structure or an error.

Structs

  • ReaderParams tells us what our reader should be doing.

Enums

  • The type of delimiter that we can use