Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am looking for a way to chain the usage of the try! macro in Rust and found this pull request that implements the ? operator.

It seems like it has been merged, but I cannot seem to find any documentation on it yet. Is it equivalent to the try! macro or are there important differences?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
796 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, the ? operator is equivalent to try!(). ? is now in stable Rust 1.13, released on November 10, 2016.

The best source of documentation at the moment seems to be RFC 0243. Note that the catch described in the RFC is not yet implemented at this writing (issue).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...