I often see functions or methods returning Result<(), Error> like this:
fn f() -> Result<(), Error> {
Ok(())
}
In other words such return returns nothing or an error. Why use Result in such situations but not an Option? I think Option would be more suitable, as it effectively returns None or value, in our example - None or an error.
fn f() -> Option<Error> {
None
}