martin-g commented on code in PR #193:
URL: https://github.com/apache/avro-rs/pull/193#discussion_r2073292698
##########
avro/src/writer.rs:
##########
@@ -658,6 +656,23 @@ pub fn to_avro_datum<T: Into<Value>>(schema: &Schema,
value: T) -> AvroResult<Ve
Ok(buffer)
}
+/// Write the referenced [Serialize]able object to the provided [Write] object.
+/// Returns a result with the number of bytes written.
+///
+/// **NOTE** This function has a quite small niche of usage and does **NOT**
generate headers and sync
+/// markers; use [`append_ser`](struct.Writer.html#method.append_ser) to be
fully Avro-compatible
+/// if you don't know what you are doing, instead.
+pub fn write_avro_datum_ref<T: Serialize, W: Write>(
Review Comment:
How do you intent to use this method ?
In its current state it is not visible to the user application.
Should we add it to lib.rs ?
```diff
diff --git i/avro/src/lib.rs w/avro/src/lib.rs
index 930541a..abf775e 100644
--- i/avro/src/lib.rs
+++ w/avro/src/lib.rs
@@ -906,7 +906,7 @@ pub use ser::to_value;
pub use util::{max_allocation_bytes, set_serde_human_readable};
pub use uuid::Uuid;
pub use writer::{
- to_avro_datum, to_avro_datum_schemata, GenericSingleObjectWriter,
SpecificSingleObjectWriter,
+ to_avro_datum, to_avro_datum_schemata, write_avro_datum_ref,
GenericSingleObjectWriter, SpecificSingleObjectWriter,
Writer,
};
```
--
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]