pub struct VbBlockReader<R>where
R: Read,{ /* private fields */ }Expand description
Bounded VB block reader yielding framed records.
Lengths are validated before any allocation or extraction. An RDW length inside a block includes its own 4-byte header (mainframe LL convention), unlike the bare-RDW payload-length convention.
Implementations§
Source§impl<R> VbBlockReader<R>where
R: Read,
impl<R> VbBlockReader<R>where
R: Read,
Sourcepub fn new(input: R, strict_mode: bool) -> VbBlockReader<R>
pub fn new(input: R, strict_mode: bool) -> VbBlockReader<R>
Create a new VB block reader.
Sourcepub fn read_record(&mut self) -> Result<Option<VbRecord>, Error>
pub fn read_record(&mut self) -> Result<Option<VbRecord>, Error>
Read the next framed record, or None on clean EOF.
§Errors
Returns CBKF222/CBKF223/CBKF224/CBKF225 framing failures with
block index, physical offsets, and claimed versus available lengths.
Sourcepub const fn block_count(&self) -> u64
pub const fn block_count(&self) -> u64
Number of blocks fully consumed.
Sourcepub const fn record_count(&self) -> u64
pub const fn record_count(&self) -> u64
Number of records yielded.
Sourcepub const fn physical_bytes(&self) -> u64
pub const fn physical_bytes(&self) -> u64
Physical input bytes consumed, headers included.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for VbBlockReader<R>
impl<R> RefUnwindSafe for VbBlockReader<R>where
BufReader<R>: RefUnwindSafe,
impl<R> Send for VbBlockReader<R>
impl<R> Sync for VbBlockReader<R>
impl<R> Unpin for VbBlockReader<R>
impl<R> UnsafeUnpin for VbBlockReader<R>where
BufReader<R>: UnsafeUnpin,
impl<R> UnwindSafe for VbBlockReader<R>where
BufReader<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