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
{{ message }}
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
error[E0277]: the trait bound `U<'a, A>: Decode` is not satisfied
--> src/main.rs:4:18
|
4 | #[derive(Encode, Decode)]
| ^^^^^^ the trait `Decode` is not implemented for `U<'a, A>`
|
= note: required because of the requirements on the impl of `Decode` for `Cow<'_, U<'a, A>>`
= note: required because of the requirements on the impl of `BorrowDecode<'_>` for `Cow<'_, U<'a, A>>`
note: required by a bound in `borrow_decode`
--> /home/andre/.cargo/registry/src/github.com-1ecc6299db9ec823/bincode-2.0.0-alpha.0/src/de/mod.rs:34:25
|
34 | fn borrow_decode<D: BorrowDecoder<'de>>(decoder: D) -> Result<Self, DecodeError>;
| ^^^^^^^^^^^^^^^^^^ required by this bound in `borrow_decode`
= note: this error originates in the derive macro `Decode` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
The code works if one of the Cows is removed. Is it possible to derive(Decode) in the nested case?