🎭 Result
Dealing with results
match result?- success → unwrap()
- error → returns err up the call chain (e.g. returns function)
- only works if enclosing function has
Resultreturn type
- only works if enclosing function has
result.is_ok(),result.is_error()→ boolresult.ok()→ Option<T> (discards error)result.err()→ Option<E> (discards result)
🔗 Links