[][src]Module data_reader::reader::prim_reader

Functions

load_txt_bool

load_txt_bool reads in a data file that is made up of bool type data. If this assumption is not made then the parser will fail during the conversion between strings to bool. 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. Bool values must be written as true or false for Rust's native from_str to work. If you have it as a series of numbers then you'll want to use int types instead and manually convert things.

load_txt_char

load_txt_char reads in a data file that is made up of char type data. If this assumption is not made then the parser will fail during the conversion between strings to char. 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. This works as long as your data is simply single chars with a delimiter next to them. It will not return white spaces although since those are stripped from each line.

load_txt_string

load_txt_string reads in a data file that is made up of string type data. If this assumption is not made then the parser will fail during the conversion between strings to string. 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.