pub async fn infer_schema<R, F>(
    reader: &mut AsyncReader<R>,
    max_rows: Option<usize>,
    has_header: bool,
    infer: &F
) -> Result<(Vec<Field>, usize)> where
    R: AsyncRead + AsyncSeek + Unpin + Send + Sync,
    F: Fn(&[u8]) -> DataType
Available on (crate features io_csv_read or io_csv_read_async or io_csv_write) and crate feature io_csv_read_async only.
Expand description

Infers the Fields of a CSV file by reading through the first n records up to max_rows. Seeks back to the begining of the file after the header