You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm trying to use a tcp OwnedWriteHalf from tokio with flate2, but am unable to do so as it does not implement Write and instead only implements AsyncWrite.
Is there a way for me to still use this library? Since GzEncoder etc... all require Write but also implement AsyncWrite when the wrapped T does, it feels like that the Write bound is too restrictive.
I think this comes from using the older AsyncRead/AsyncWrite definitions from tokio-io. In that crate they were extensions of Read/Write. But in more recent tokio they are not.
As @TheNeikos points out, this comes from the R: Read bound when using most of the ::new fns. This was always true in the past because of AsyncRead being historically Read.
Hello! I'm trying to use a tcp
OwnedWriteHalf
from tokio with flate2, but am unable to do so as it does not implementWrite
and instead only implementsAsyncWrite
.Is there a way for me to still use this library? Since
GzEncoder
etc... all requireWrite
but also implementAsyncWrite
when the wrappedT
does, it feels like that theWrite
bound is too restrictive.Simple playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b0c9dd53d0735d38f24e076a1469c9e0
The text was updated successfully, but these errors were encountered: