Rust doesn’t have function overloading, so there should be a way to declare “unwrap with a message”, and that is expect.
expect==unwrapwith a messageexpect_err==unwrap_errwith a message
About usage scenarios of “unwrap vs expect” Rust Book (Ch 9) says:
Using expect instead of unwrap and providing good error messages can convey your intent and make tracking down the source of a panic easier.
Because this error message starts with the text we specified… it will be easier to find where in the code this error message is coming from.