pub struct InputReader<'a> { /* private fields */ }
Expand description
A reader over an Input
, which may help you in reading chunks of data from the input.
Implementations§
Source§impl<'a> InputReader<'a>
impl<'a> InputReader<'a>
Sourcepub fn new_at(position: usize, input: Input<'a>) -> Self
pub fn new_at(position: usize, input: Input<'a>) -> Self
Creates a new reader from a given input, starting at a given position.
Sourcepub fn iter_n_f64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = f64>
pub fn iter_n_f64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = f64>
Iterates through n
floats, advancing the reader.
Sourcepub fn iter_n_u64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = u64>
pub fn iter_n_u64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = u64>
Iterates through n
unsigned integers, advancing the reader.
Sourcepub fn iter_n_i64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = i64>
pub fn iter_n_i64(&'a mut self, n: usize) -> impl 'a + Iterator<Item = i64>
Iterates through n
integers, advancing the reader.
Sourcepub fn read_n_f64(&mut self, n: usize) -> Vec<f64>
pub fn read_n_f64(&mut self, n: usize) -> Vec<f64>
Reads n
floats, advancing the reader.
Sourcepub fn read_n_u64(&mut self, n: usize) -> Vec<u64>
pub fn read_n_u64(&mut self, n: usize) -> Vec<u64>
Reads n
unsigned integers, advancing the reader.
Sourcepub fn read_n_i64(&mut self, n: usize) -> Vec<i64>
pub fn read_n_i64(&mut self, n: usize) -> Vec<i64>
Reads n
integers, advancing the reader.
Sourcepub fn read_f64_into(&mut self, slice: &mut [f64])
pub fn read_f64_into(&mut self, slice: &mut [f64])
Reads n
floats into a slice, advancing the reader.
Sourcepub fn read_u64_into(&mut self, slice: &mut [u64])
pub fn read_u64_into(&mut self, slice: &mut [u64])
Reads n
unsigned integers into a slice, advancing the reader.
Sourcepub fn read_i64_into(&mut self, slice: &mut [i64])
pub fn read_i64_into(&mut self, slice: &mut [i64])
Reads n
integers into a slice, advancing the reader.
Trait Implementations§
Source§impl<'a> Clone for InputReader<'a>
impl<'a> Clone for InputReader<'a>
Source§fn clone(&self) -> InputReader<'a>
fn clone(&self) -> InputReader<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for InputReader<'a>
impl<'a> Debug for InputReader<'a>
impl<'a> Copy for InputReader<'a>
Auto Trait Implementations§
impl<'a> Freeze for InputReader<'a>
impl<'a> RefUnwindSafe for InputReader<'a>
impl<'a> Send for InputReader<'a>
impl<'a> Sync for InputReader<'a>
impl<'a> Unpin for InputReader<'a>
impl<'a> UnwindSafe for InputReader<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more