Keyword fn[]

The fn keyword.

The fn keyword is used to declare a function.

Example:

fn some_function() {
    // code goes in here
}Run

For more information about functions, take a look at the Rust Book.