unwrap_or

Unwrap-or provides four macros that allow you to use code in the same scope as the calling function. They are similar to Rust's unwraporelse, but the provided code is not in a closure, but in the function itself.

This allows for more flexibility in what you can write. You can have a return, break, or continue statement when an error occurs, without worrying about any complicated return logic to make it happen. You can also directly reference variables in the calling function without having to move them into the closure.

Here's an example of using it:

```rust fn afunctionwhichmayfail() -> Result { Error("There was an error!") }

fn anotherfunction() -> Result<(), String> { let _okvalue = unwrapokor!(afunctionwhichmayfail(), errorvalue, { log(errorvalue); return error_value; }); Ok(()) } ```

The macro above expands to a simple match function:

rust let _ok_value = match a_function_which_may_fail() { Ok(v) => v, Err(error_value) => { log(error_value); return error_value; } }

There are four functions with this syntax:

```rust let okvalue = unwrapokor!(functionreturningresult, errorvariablename, codetorunon_error);

let errorvalue = unwraperror!(functionreturningresult, okvariablename, codetorunon_ok);

let somevalue = unwrapsomeor!(functionreturningoption, codetorunon_none);

let nonevalue = unwrapnoneor!(functionreturningoption, somevariablename, codetorunon_some); ```