Hi @Yuri_Gor , this is a similar issue to that described in this thread. In short, Cursor<T>
type only implements Stream
if the T
implements DeserializeOwned
, Unpin
, Send
, and Sync
. Because Rc
is !Send
and !Sync
, adding the Rc
makes it so the Cursor
no longer implements Stream
.
To work around this, we would suggest using an Arc
rather than an Rc
, since Arc
implements Send
and Sync
.
Relatedly, this has come up in the past and we may be able to relax these trait bounds in the future to avoid errors like this altogether; see RUST-1358 for details.