> File.open(path).orReturnErr()
Method syntax is reserved for functions. There are no method syntax macros. Since a return in a function terminates execution of this function, and not its caller, your example would not work.
Method syntax is reserved for functions. There are no method syntax macros. Since a return in a function terminates execution of this function, and not its caller, your example would not work.
let a: Result<u8, u8> = /* whatever *;
let b = match a {
Ok(v) => Ok(foo(v)),
e => e,
};
and transform it into: let a: Result<u8, u8> = /* whatever *;
let b = a.map(foo);
if "foo" is a macro. When you substitute "foo!" for all the "foo" above, it is obvious.await cannot be a macro, it has to be built into the language, and so it doesn't have the ! because it's not one.