A free standing implementation of [`crate::Decoder::decode_record`], which drives the supplied [`Visitor`]. Simplifies decoder implementations operating on [`Txdata`], as the implementation only needs to care about managing the [`Visitor`] (which may be behind a lock).
(
visitor: &mut V,
version: u8,
tx_offset: u64,
reader: &mut R,
)
| 556 | /// implementation only needs to care about managing the [`Visitor`] (which may |
| 557 | /// be behind a lock). |
| 558 | pub fn decode_record_fn<'a, V, R>( |
| 559 | visitor: &mut V, |
| 560 | version: u8, |
| 561 | tx_offset: u64, |
| 562 | reader: &mut R, |
| 563 | ) -> Result<Txdata<V::Row>, DecoderError<V::Error>> |
| 564 | where |
| 565 | V: Visitor, |
| 566 | V::Row: Encode, |
| 567 | R: BufReader<'a>, |
| 568 | { |
| 569 | process_record(visitor, version, tx_offset, reader, Txdata::decode) |
| 570 | } |
| 571 | |
| 572 | /// Variant of [`decode_record_fn`] which expects, but doesn't allocate |
| 573 | /// [`Txdata`] records. |
no test coverage detected
searching dependent graphs…