pub struct TemperatureReader { /* private fields */ }Implementations§
Source§impl TemperatureReader
impl TemperatureReader
pub fn new() -> Self
pub fn with_skip_headers(skip_headers: bool) -> Self
pub fn with_mmap(use_mmap: bool) -> Self
Sourcepub fn read_temperatures(&self, path: &Path) -> Result<Vec<TemperatureRecord>>
pub fn read_temperatures(&self, path: &Path) -> Result<Vec<TemperatureRecord>>
Read temperature records from a file (extracts station ID from filename)
Sourcepub fn read_temperatures_with_station_id(
&self,
path: &Path,
station_id: u32,
) -> Result<Vec<TemperatureRecord>>
pub fn read_temperatures_with_station_id( &self, path: &Path, station_id: u32, ) -> Result<Vec<TemperatureRecord>>
Read temperature records from a file with explicit station ID
Sourcepub fn extract_station_id_from_path(&self, path: &Path) -> Result<u32>
pub fn extract_station_id_from_path(&self, path: &Path) -> Result<u32>
Extract station ID from filename (e.g., TN_STAID000257.txt -> 257)
Sourcepub fn read_station_temperatures(
&self,
path: &Path,
station_id: u32,
) -> Result<Vec<TemperatureRecord>>
pub fn read_station_temperatures( &self, path: &Path, station_id: u32, ) -> Result<Vec<TemperatureRecord>>
Read temperature records for a specific station
Sourcepub fn stream_temperatures<'a>(
&self,
path: &'a Path,
) -> Result<TemperatureIterator<'a>>
pub fn stream_temperatures<'a>( &self, path: &'a Path, ) -> Result<TemperatureIterator<'a>>
Stream temperature records using an iterator (memory efficient for large files)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemperatureReader
impl RefUnwindSafe for TemperatureReader
impl Send for TemperatureReader
impl Sync for TemperatureReader
impl Unpin for TemperatureReader
impl UnwindSafe for TemperatureReader
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more