[−][src]Macro partial_ref::partial
Concise syntax for partial reference types.
The first parameter is the reference target type, optionally preceded by a lifetime. The
following parameters are the referenced parts, each optionally preceded by the keyword mut
to
indicate a mutable reference to that part. Nested parts can be specified using the pipe syntax
of nested_part
.
Examples:
partial!(Ty, PartA)
isConst<PartA, Ref<Ty>>
partial!('a Ty, mut PartA)
isMut<PartA, Ref<'a, Ty>>
partial!(Ty, PartA, PartB, mut PartC)
isConst<PartA, Const<PartB, Mut<PartC, Ref<Ty>>
partial!('a Ty, mut PartA | PartB)
isMut<Nested<PartA, PartB>, Ref<'a, Ty>>