I have a struct which has 2 pointer field, and I want to make unsize coercion on both of them. I have tried several methods but can't make it to work. See playground for a demo.
struct A<B:?Sized, C:?Sized> {
b: *const B,
c: *const C,
}
I want a way to control the unsize coersion manually, so I can coerce A<B, C>
to A<UB, C>
, A<B, UC>
or A<UB, UC>
by calling different method, where B: Unsize<UB>, C:Unsize<UC>
.
If it is not possible, then is an auto unsize coersion from A<B, C>
to A<UB, UC>
possible? How?
Thanks for any help!