pub struct BlkFileIter<'a> { /* private fields */ }Expand description
Iterator over raw block messages in a Bitcoin Core blkNNNNN.dat file.
Each entry in these files is: [magic: 4] [size: u32-le] [block: size bytes].
Implementations§
Source§impl<'a> BlkFileIter<'a>
impl<'a> BlkFileIter<'a>
Sourcepub fn new(data: &'a [u8], magic: [u8; 4]) -> Self
pub fn new(data: &'a [u8], magic: [u8; 4]) -> Self
Create an iterator over a raw .dat file buffer with the given magic.
Sourcepub fn next_block(&mut self) -> ParseResult<Option<&'a [u8]>>
pub fn next_block(&mut self) -> ParseResult<Option<&'a [u8]>>
Return the next raw block bytes (zero-copy sub-slice), or None at EOF.
Auto Trait Implementations§
impl<'a> Freeze for BlkFileIter<'a>
impl<'a> RefUnwindSafe for BlkFileIter<'a>
impl<'a> Send for BlkFileIter<'a>
impl<'a> Sync for BlkFileIter<'a>
impl<'a> Unpin for BlkFileIter<'a>
impl<'a> UnsafeUnpin for BlkFileIter<'a>
impl<'a> UnwindSafe for BlkFileIter<'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