pub struct Reader<const N: usize> {
filepath: PathBuf,
reader: BufReader<File>,
line_buffer: FileBuffer<N>,
}Fields§
§filepath: PathBuf§reader: BufReader<File>§line_buffer: FileBuffer<N>Implementations§
Source§impl<const N: usize> Reader<N>
impl<const N: usize> Reader<N>
pub fn new(path: impl AsRef<Path>) -> Result<Self>
pub fn path(&self) -> &Path
pub fn check_lines_contains(&mut self, name: &str) -> Result<()>
pub fn check_eof(&mut self) -> Result<bool>
fn get_line(&mut self) -> Result<&FileBuffer<N>>
pub fn get_line_string(&mut self) -> Result<String>
pub fn ignore_line(&mut self) -> Result<()>
pub fn ignore_bytes(&mut self, n: i64) -> Result<()>
pub fn rollback_n(&mut self, n: i64) -> Result<()>
pub fn rollback(&mut self) -> Result<()>
pub fn read_i32(&mut self) -> Result<i32>
pub fn read_f32(&mut self) -> Result<f32>
pub fn read_buffer_f32(&mut self, size: usize) -> Result<Vec<f32>>
Auto Trait Implementations§
impl<const N: usize> Freeze for Reader<N>
impl<const N: usize> RefUnwindSafe for Reader<N>
impl<const N: usize> Send for Reader<N>
impl<const N: usize> Sync for Reader<N>
impl<const N: usize> Unpin for Reader<N>
impl<const N: usize> UnsafeUnpin for Reader<N>
impl<const N: usize> UnwindSafe for Reader<N>
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.