Method
decode
(
&mut self,
bytes: &mut &[u8],
)
Source from the content-addressed store, hash-verified
| 32 | } |
| 33 | |
| 34 | pub async fn decode( |
| 35 | &mut self, |
| 36 | bytes: &mut &[u8], |
| 37 | ) -> Result<Result<Option<Row>, DecodeErrorKind>, anyhow::Error> { |
| 38 | let result = match self.decoder.decode(bytes).await? { |
| 39 | Ok(row) => { |
| 40 | self.events_success += 1; |
| 41 | Ok(Some(row)) |
| 42 | } |
| 43 | Err(err) => Err(DecodeErrorKind::Text( |
| 44 | format!("avro deserialization error: {}", err.display_with_causes()).into(), |
| 45 | )), |
| 46 | }; |
| 47 | Ok(result) |
| 48 | } |
| 49 | } |
Tested by
no test coverage detected