This is a Rust Enum that can represent a success or error.

enum Result<T, E>{
	Ok(T),
	Err(E)
}

Methods

.expect(ā€œmessageā€)

  • If the result returned Err(E), then the program will crash and display string
  • If the result returned Ok(T), expect will return the value within Ok(T)