Kriskras99 commented on code in PR #512:
URL: https://github.com/apache/avro-rs/pull/512#discussion_r2969300320
##########
avro/src/reader/datum.rs:
##########
@@ -124,6 +137,68 @@ impl<'s> GenericDatumReader<'s> {
Ok(value)
}
}
+
+ /// Read a Avro datum from the reader.
+ ///
+ /// # Panics
+ /// Will panic if a reader schema has been configured, this is a WIP.
+ pub fn read_deser<T: DeserializeOwned>(&self, reader: &mut impl Read) ->
AvroResult<T> {
+ // `reader` is `impl Read` instead of a generic on the function like T
so it's easier to
+ // specify the type wanted (`read_deser<String>` vs
`read_deser<String, _>`)
+ if let Some((_, _)) = &self.reader {
+ todo!("Schema aware deserialisation does not resolve schemas yet");
Review Comment:
Follow-up, I've changed it to a panic and a comment. It's also documented as
a panic on `read_deser`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]