MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / decode

Method decode

src/storage/src/decode/avro.rs:34–48  ·  view source on GitHub ↗
(
        &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}

Callers 2

decodeFunction · 0.45
get_valueMethod · 0.45

Calls 1

TextClass · 0.85

Tested by

no test coverage detected