Note: Functions can implement all three of the Fn traits too.
If what we want to do doesn’t require capturing a value from the environment,
we can use the name of a function rather than a closure where we need something
that implements one of the Fn traits. For example, on an Option<Vec<T>> value,
we could call unwrap_or_else(Vec::new) to get a new, empty vector if the value is None.
How can functions implement traits? As per my understanding, only structs, closures and primitive types can implement traits.
All three. Free functions (that don't capture anything) don't have any environment to move or mutate, so they vacuously satisfy the requirements of Fn, FnMut, and FnOnce.