• Home
  • Raw
  • Download

Lines Matching refs:rdr

133     pub fn from_reader<R: io::Read>(&self, rdr: R) -> Reader<R> {  in from_reader()
134 Reader::new(self, rdr) in from_reader()
715 rdr: io::BufReader<R>, field
819 fn new(builder: &ReaderBuilder, rdr: R) -> Reader<R> { in new()
822 rdr: io::BufReader::with_capacity(builder.capacity, rdr), in new()
863 pub fn from_reader(rdr: R) -> Reader<R> { in from_reader()
864 ReaderBuilder::new().from_reader(rdr) in from_reader()
1638 let input_res = self.rdr.fill_buf(); in read_byte_record_impl()
1650 self.rdr.consume(nin); in read_byte_record_impl()
1765 self.rdr.get_ref() in get_ref()
1770 self.rdr.get_mut() in get_mut()
1778 self.rdr.into_inner() in into_inner()
1851 self.rdr.seek(io::SeekFrom::Start(pos.byte()))?; in seek()
1879 self.rdr.seek(seek_from)?; in seek_raw()
1916 rdr: Reader<R>, field
1923 fn new(mut rdr: Reader<R>) -> DeserializeRecordsIntoIter<R, D> { in new()
1924 let headers = if !rdr.state.has_headers { in new()
1927 rdr.headers().ok().map(Clone::clone) in new()
1930 rdr: rdr, in new()
1939 &self.rdr in reader()
1944 &mut self.rdr in reader_mut()
1949 self.rdr in into_reader()
1959 match self.rdr.read_record(&mut self.rec) { in next()
1974 rdr: &'r mut Reader<R>, field
1981 fn new(rdr: &'r mut Reader<R>) -> DeserializeRecordsIter<'r, R, D> { in new()
1982 let headers = if !rdr.state.has_headers { in new()
1985 rdr.headers().ok().map(Clone::clone) in new()
1988 rdr: rdr, in new()
1997 &self.rdr in reader()
2002 &mut self.rdr in reader_mut()
2012 match self.rdr.read_record(&mut self.rec) { in next()
2022 rdr: Reader<R>, field
2027 fn new(rdr: Reader<R>) -> StringRecordsIntoIter<R> { in new()
2028 StringRecordsIntoIter { rdr: rdr, rec: StringRecord::new() } in new()
2033 &self.rdr in reader()
2038 &mut self.rdr in reader_mut()
2043 self.rdr in into_reader()
2051 match self.rdr.read_record(&mut self.rec) { in next()
2064 rdr: &'r mut Reader<R>, field
2069 fn new(rdr: &'r mut Reader<R>) -> StringRecordsIter<'r, R> { in new()
2070 StringRecordsIter { rdr: rdr, rec: StringRecord::new() } in new()
2075 &self.rdr in reader()
2080 &mut self.rdr in reader_mut()
2088 match self.rdr.read_record(&mut self.rec) { in next()
2098 rdr: Reader<R>, field
2103 fn new(rdr: Reader<R>) -> ByteRecordsIntoIter<R> { in new()
2104 ByteRecordsIntoIter { rdr: rdr, rec: ByteRecord::new() } in new()
2109 &self.rdr in reader()
2114 &mut self.rdr in reader_mut()
2119 self.rdr in into_reader()
2127 match self.rdr.read_byte_record(&mut self.rec) { in next()
2140 rdr: &'r mut Reader<R>, field
2145 fn new(rdr: &'r mut Reader<R>) -> ByteRecordsIter<'r, R> { in new()
2146 ByteRecordsIter { rdr: rdr, rec: ByteRecord::new() } in new()
2151 &self.rdr in reader()
2156 &mut self.rdr in reader_mut()
2164 match self.rdr.read_byte_record(&mut self.rec) { in next()
2198 let mut rdr = in read_byte_record() localVariable
2202 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_byte_record()
2208 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_byte_record()
2214 assert!(!rdr.read_byte_record(&mut rec).unwrap()); in read_byte_record()
2220 let mut rdr = ReaderBuilder::new() in read_trimmed_records_and_headers() localVariable
2225 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_trimmed_records_and_headers()
2230 assert!(rdr.read_record(&mut rec).unwrap()); in read_trimmed_records_and_headers()
2235 let headers = rdr.headers().unwrap(); in read_trimmed_records_and_headers()
2246 let mut rdr = ReaderBuilder::new() in read_trimmed_header() localVariable
2251 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_trimmed_header()
2256 let headers = rdr.headers().unwrap(); in read_trimmed_header()
2267 let mut rdr = ReaderBuilder::new() in read_trimed_header_invalid_utf8() localVariable
2274 let _ = rdr.read_record(&mut rec); in read_trimed_header_invalid_utf8()
2277 let headers = rdr.byte_headers().unwrap(); in read_trimed_header_invalid_utf8()
2283 match *rdr.headers().unwrap_err().kind() { in read_trimed_header_invalid_utf8()
2296 let mut rdr = ReaderBuilder::new() in read_trimmed_records() localVariable
2301 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_trimmed_records()
2306 let headers = rdr.headers().unwrap(); in read_trimmed_records()
2317 let mut rdr = in read_record_unequal_fails() localVariable
2321 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_fails()
2325 match rdr.read_byte_record(&mut rec) { in read_record_unequal_fails()
2343 let mut rdr = ReaderBuilder::new() in read_record_unequal_ok() localVariable
2349 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_ok()
2353 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_ok()
2358 assert!(!rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_ok()
2366 let mut rdr = in read_record_unequal_continue() localVariable
2370 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_continue()
2374 match rdr.read_byte_record(&mut rec) { in read_record_unequal_continue()
2388 assert!(rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_continue()
2392 assert!(!rdr.read_byte_record(&mut rec).unwrap()); in read_record_unequal_continue()
2398 let mut rdr = ReaderBuilder::new().has_headers(true).from_reader(data); in read_record_headers() localVariable
2401 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_headers()
2405 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_headers()
2409 assert!(!rdr.read_record(&mut rec).unwrap()); in read_record_headers()
2412 let headers = rdr.byte_headers().unwrap(); in read_record_headers()
2419 let headers = rdr.headers().unwrap(); in read_record_headers()
2430 let mut rdr = ReaderBuilder::new().has_headers(true).from_reader(data); in read_record_headers_invalid_utf8() localVariable
2433 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_headers_invalid_utf8()
2437 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_headers_invalid_utf8()
2441 assert!(!rdr.read_record(&mut rec).unwrap()); in read_record_headers_invalid_utf8()
2446 let headers = rdr.byte_headers().unwrap(); in read_record_headers_invalid_utf8()
2452 match *rdr.headers().unwrap_err().kind() { in read_record_headers_invalid_utf8()
2465 let mut rdr = in read_record_no_headers_before() localVariable
2470 let headers = rdr.headers().unwrap(); in read_record_no_headers_before()
2477 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_before()
2481 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_before()
2485 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_before()
2489 assert!(!rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_before()
2495 let mut rdr = in read_record_no_headers_after() localVariable
2499 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_after()
2503 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_after()
2507 assert!(rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_after()
2511 assert!(!rdr.read_record(&mut rec).unwrap()); in read_record_no_headers_after()
2513 let headers = rdr.headers().unwrap(); in read_record_no_headers_after()
2523 let mut rdr = ReaderBuilder::new().from_reader(io::Cursor::new(data)); in seek() localVariable
2524 rdr.seek(newpos(18, 3, 2)).unwrap(); in seek()
2528 assert_eq!(18, rdr.position().byte()); in seek()
2529 assert!(rdr.read_record(&mut rec).unwrap()); in seek()
2533 assert_eq!(24, rdr.position().byte()); in seek()
2534 assert_eq!(4, rdr.position().line()); in seek()
2535 assert_eq!(3, rdr.position().record()); in seek()
2536 assert!(rdr.read_record(&mut rec).unwrap()); in seek()
2540 assert!(!rdr.read_record(&mut rec).unwrap()); in seek()
2548 let mut rdr = ReaderBuilder::new().from_reader(io::Cursor::new(data)); in seek_headers_after() localVariable
2549 rdr.seek(newpos(18, 3, 2)).unwrap(); in seek_headers_after()
2550 assert_eq!(rdr.headers().unwrap(), vec!["foo", "bar", "baz"]); in seek_headers_after()
2558 let mut rdr = ReaderBuilder::new().from_reader(io::Cursor::new(data)); in seek_headers_before_after() localVariable
2559 let headers = rdr.headers().unwrap().clone(); in seek_headers_before_after()
2560 rdr.seek(newpos(18, 3, 2)).unwrap(); in seek_headers_before_after()
2561 assert_eq!(&headers, rdr.headers().unwrap()); in seek_headers_before_after()
2570 let mut rdr = ReaderBuilder::new().from_reader(io::Cursor::new(data)); in seek_headers_no_actual_seek() localVariable
2571 rdr.seek(Position::new()).unwrap(); in seek_headers_no_actual_seek()
2572 assert_eq!("foo", &rdr.headers().unwrap()[0]); in seek_headers_no_actual_seek()
2578 let mut rdr = ReaderBuilder::new() in positions_no_headers() localVariable
2583 let pos = rdr.next().unwrap().unwrap().position().unwrap().clone(); in positions_no_headers()
2588 let pos = rdr.next().unwrap().unwrap().position().unwrap().clone(); in positions_no_headers()
2597 let mut rdr = ReaderBuilder::new() in positions_headers() localVariable
2602 let pos = rdr.next().unwrap().unwrap().position().unwrap().clone(); in positions_headers()
2611 let mut rdr = ReaderBuilder::new().from_reader("".as_bytes()); in headers_on_empty_data() localVariable
2612 let r = rdr.byte_headers().unwrap(); in headers_on_empty_data()
2619 let mut rdr = in no_headers_on_empty_data() localVariable
2621 assert_eq!(rdr.records().count(), 0); in no_headers_on_empty_data()
2628 let mut rdr = in no_headers_on_empty_data_after_headers() localVariable
2630 assert_eq!(rdr.headers().unwrap().len(), 0); in no_headers_on_empty_data_after_headers()
2631 assert_eq!(rdr.records().count(), 0); in no_headers_on_empty_data_after_headers()