Home
DevCentral
Search
Configure Global Search
Log In
Transactions
D1656
Change Details
Change Details
Old
New
Diff
When a library needs to communicate an error status, to be handled only by an initial caller down in the task or a success, the Result generic type from the Rust library is convenient. If PHP doesn't have the generics and Rust-like enum, we can at least provide a base class Result, with two concrete implementations: - Err for exceptions - Ok for actual values Reference: https://doc.rust-lang.org/book/second-edition/ch09-02-recoverable-errors-with-result.html
When a library needs to communicate an error status, to be handled only by an initial caller down in the task or a success, the Result generic type from the Rust library is convenient. If PHP doesn't have the generics and Rust-like enum, we can at least provide a base class Result, with two concrete implementations: - Err for exceptions - Ok for actual values Reference: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html
When a library needs to communicate an error status, to be handled only by an initial caller down in the task or a success, the Result generic type from the Rust library is convenient. If PHP doesn't have the generics and Rust-like enum, we can at least provide a base class Result, with two concrete implementations: - Err for exceptions - Ok for actual values Reference: https://doc.rust-lang.org/book/
second-edition/
ch09-02-recoverable-errors-with-result.html
Continue