Result
Result represents a value that succeeded, with Ok(...), or failed, with Err(...).
Ok(...)
Err(...)
For example, reading a file might return Ok("contents of file") or Err("file did not exist").
Ok("contents of file")
Err("file did not exist")
Source Codeenum Result<T, E> { Ok(T), Err(E), }
enum Result<T, E> { Ok(T), Err(E), }
or_throw