by nemaar · 10y ago · 0 comments
public void someOperation() throws SomeException { ... }fn something() -> (String, String) ...
let (result, err) = something()
It's just that Result is preferable because you can pattern match on it
fn something() -> (Option<String>, Option<String>)
Because the Rust types aren't nullable by default. But that more clearly demonstrates that Result types are better since they enforce that the error and result are mutually exclusive.