borsh-rs
borsh-rs copied to clipboard
Failed to derive borsh ser/de in a recursive data structure
Minimal example:
#[derive(BorshSerialize, BorshDeserialize)]
enum A {
X,
Y(Box<A>),
}
gives compilation error:
error[E0275]: overflow evaluating the requirement `Box<A>: BorshSerialize`
--> src/main.rs:3:10
|
3 | #[derive(BorshSerialize, BorshDeserialize)]
| ^^^^^^^^^^^^^^
|
serde, can handle this case, btw
Any plan to support this anytime soon?
@vantessel I believe the original motivation died out and there is currently no champion to implement it. I am happy to review a PR if anyone is ready to contribute the implementation, just make sure you read the discussion in PR #96 that did not get through.