What's the Rust equivalent return value of a Java function that returns multiple exceptions? -
What is the proper return value of the function in Jungle, which looks like this in Java?
Zero validation (string input) {if (!! Input)! Return exception 1 ("...."); If (check input 2 (input)) return exception 2 ("...."); If (check input 3 (input)) return exception 3 ("...."); } I think this should be the To explain the present function in any form, either correct Feeling, result or result < Bool, & amp; Str & gt; Current position of art in the war:
To represent a enum result, being bool being "simplest" option , complete the result results & lt; R, E & gt; A unique challenge, it can be displayed as either:
Results & lt; (), Error & gt; Error with option Error & gt; If you search for an error instead of evaluating inworld > function, results & lt; (), Error & gt; Being more easily responsive to ! and the like.
Comments
Post a Comment