`try!(foo)` is roughly equivalent to this (invalid) code:
foo().unwrap_or_else({ |e| return Err(e) })
Or in Go terms: a := try!(foo)
is equivalent to: a, err := foo()
if err != nil {
return nil, err
}
Basically it will take the result of foo, and if foo returns an error it will return the error itself.https://doc.rust-lang.org/beta/std/result/ has lots of examples of alternative ways you can deal with the error case, or the Ok() case of a result.