pub struct FixedRecordReader<R: Read> { /* private fields */ }Expand description
Fixed record reader for processing fixed-length records.
Implementations§
Source§impl<R: Read> FixedRecordReader<R>
impl<R: Read> FixedRecordReader<R>
Sourcepub fn new(input: R, lrecl: Option<u32>) -> Result<Self>
pub fn new(input: R, lrecl: Option<u32>) -> Result<Self>
Create a new fixed record reader.
§Errors
Returns an error if no LRECL is provided or if it is zero.
Sourcepub fn validate_record_length(
&self,
schema: &Schema,
record_data: &[u8],
) -> Result<()>
pub fn validate_record_length( &self, schema: &Schema, record_data: &[u8], ) -> Result<()>
Validate record length against schema expectations.
§Errors
Returns an error if the record length does not match configured LRECL.
Sourcepub fn record_count(&self) -> u64
pub fn record_count(&self) -> u64
Get the current record count.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for FixedRecordReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for FixedRecordReader<R>where
R: RefUnwindSafe,
impl<R> Send for FixedRecordReader<R>where
R: Send,
impl<R> Sync for FixedRecordReader<R>where
R: Sync,
impl<R> Unpin for FixedRecordReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for FixedRecordReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for FixedRecordReader<R>where
R: UnwindSafe,
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