fn inspect(event: WebEvent) {
    match event {
        WebEvent::PageLoad => println!("page loaded"),
        WebEvent::PageUnload => println!("page unloaded"),
        // Destructure `c` from inside the `enum`.
        WebEvent::KeyPress(c) => println!("pressed '{}'.", c),
        WebEvent::Paste(s) => println!("pasted \"{}\".", s),
        // Destructure `Click` into `x` and `y`.
        WebEvent::Click { x, y } => {
            println!("clicked at x={}, y={}.", x, y);
        },
    }
}
// A function which takes a `WebEvent` enum as an argument and
// returns nothing.
A function which takes a `WebEvent` enum as an argument and
returns nothing.
A function which takes a ` WebEvent ` enum as an argument and returns nothing .
fn inspect(event: WebEvent) {
    match event {
        WebEvent::PageLoad => println!("page loaded"),
        WebEvent::PageUnload => println!("page unloaded"),
        // Destructure `c` from inside the `enum`.
        WebEvent::KeyPress(c) => println!("pressed '{}'.", c),
        WebEvent::Paste(s) => println!("pasted \"{}\".", s),
        // Destructure `Click` into `x` and `y`.
        WebEvent::Click { x, y } => {
            println!("clicked at x={}, y={}.", x, y);
        },
    }
}
fn inspect ( event : WebEvent ) { match event { WebEvent :: PageLoad => println ! ( " " ) , WebEvent :: PageUnload => println ! ( " " ) , // Destructure `c` from inside the `enum`. WebEvent :: KeyPress ( c ) => println ! ( " " c ) , WebEvent :: Paste ( s ) => println ! ( " \" \" " s ) , // Destructure `Click` into `x` and `y`. WebEvent :: Click { x , y } => { println ! ( " " x y ) ; } , } }
A function which takes a `WebEvent` enum as an argument and
returns nothing.
A function which takes a ` WebEvent ` enum as an argument and returns nothing .
event
WebEvent
event
WebEvent