Open
Description
Hi, I have a custom wrapper type that, in terms of encoding/decoding, should behave exactly as its underlying type:
type MyWrapper<T>;
I'm able to implement Encode
/Decode
successfully, nevertheless, if this type is used as follows:
struct Foo {
#[codec(compact)]
a: MyWrapper<u64>,
}
The compile throws an error. Basically, it requires that CompactRef<'a, MyWrapper<u64>>
implements Encode/Decode
. But I can not do that because both CompactRef
and Encode/Decode
are foreign to my crate. I can neither implement HasCompact
directly because it's already implemented for T
in the library, and to fulfill the conditions, I need the CompactRef
implementation.
Is any way to create compactables custom types?
Metadata
Metadata
Assignees
Labels
No labels