Given this struct
#[derive(borrow::Partial)]
#[module(crate::model)]
struct MyStruct {
a: A,
b: B,
c: C,
}
if I have an a: A and a b: B, can I construct a p!(<a, b>MyStructRef) or a p!(<mut a, mut b>MyStructRef), even if I do not have a c: C?
== EDIT ==
I ended up doing this:
fn mk_hidden<T>() -> Hidden<T> {
unsafe { mem::transmute(ptr::null_mut::<T>()) }
}
MyStructRef { a: &mut a, b: &mut b, c: mk_hidden::<C>() }
Given this struct
if I have an
a: Aand ab: B, can I construct ap!(<a, b>MyStructRef)or ap!(<mut a, mut b>MyStructRef), even if I do not have ac: C?== EDIT ==
I ended up doing this: