4 ms·
Same meaning as the Rust “?” operator.
by dundarious 3y ago
Same meaning as the Rust “?” operator.
- tialaramex 3y agoRust's ? is the Try operator, which is currently contemplating Try::branch() to produce a ControlFlow and then if the ControlFlow is Break it returns whatever is inside the Break. Historically ? was just doing what try! did but while that's equivalent to the current behaviour for Result, there are several more implementations of the Try trait today (and in nightly you can implement it on your own types)