Skip to main content

payload_has_fields

Function payload_has_fields 

Source
fn payload_has_fields<F: Debug>(func: &F) -> bool
Expand description

Whether a variant’s payload struct has any fields.

Decided from the Debug rendering, which every payload derives: a unit payload renders as Variant(Payload), one with fields opens a second parenthesis or a brace.