After reading the chapter about the tuple structure and transparent layout. In case of struct definitions like this:
#[repr(C)]
pub(crate) struct InnerStruct {
pub a: u32,
pub b: u32,
pub c: u32,
}
#[repr(transparent)]
pub OuterStruct(pub(crate) InnerStruct);
Normally we get access to inner struct's fields as following:
let outer = OuterStruct(...);
outer.0.a
outer.0.b
Is there any way to access these fields directly, like outer.a
or outer.b
without writing the .0
?