Variant Payloads

    • In the above example, accessing the char in KeyPress, or x and y in only works within a match or an if let statement.
    • It is possible to retrieve the discriminant by calling std::mem::discriminant()
    • WebEvent::Click { ... } is not exactly the same as WebEvent::Click(Click) with a top level . The inlined version cannot implement traits, for example.