Macro partial_ref::part
source · macro_rules! part {
($part:ident) => { ... };
(pub $part:ident) => { ... };
($part:ident : $field:ty) => { ... };
(pub $part:ident : $field:ty) => { ... };
(@template $part:ident ($($vis:tt)*) ($($part_type:tt)*)) => { ... };
}
Expand description
Declares a [Part
].
Defines an empty struct type and derives all necessary instances to use it as a marker type for parts.
This macro can define [AbstractPart
]s using part!(PartName);
or part!(pub PartName);
and
[Field
] parts using part!(PartName: FieldType);
or part!(pub PartName: FieldType);
.