splix commented on issue #136:
URL: https://github.com/apache/avro-rs/issues/136#issuecomment-2683279553
I've tried to add it, but quickly realized that it requires [mostly]
duplicate versions for too many of internal functions.
Like for
```
pub fn zag_i64<R: Read>(reader: &mut R) -> AvroResult<i64> {
let z = decode_variable(reader)?;
Ok(if z & 0x1 == 0 {
(z >> 1) as i64
} else {
!(z >> 1) as i64
})
}
```
it needs an accompanying:
```
#[cfg(feature = "tokio")]
pub async fn zag_i64_async<R: AsyncRead>(reader: &mut R) -> AvroResult<i64> {
let z = decode_variable_async(reader).await?;
Ok(if z & 0x1 == 0 {
(z >> 1) as i64
} else {
!(z >> 1) as i64
})
}
```
and so on.
It's definitely possible to implement, but the main question if that aligns
well with `avro-rs` plans?
--
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]