Expand description
Attributes to override the visibility of items.
§Example
#[visible::StructFields(pub(crate))]
pub struct Test {
pub a: i32,
pub b: i64,
}
The struct Test
will be rewritten as below:
pub struct Test {
pub(crate) a: i32,
pub(crate) b: i64,
}
Attribute Macros§
- Overrides the visibility of the annotated struct fields with the one given to this attribute: