File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -152,23 +152,6 @@ All Result types (both Ok and Err) implement these methods:
152
152
#### Pattern Matching
153
153
- ` match(callable $okFn, callable $errFn): mixed ` - Pattern match on the Result
154
154
155
- ## Comparison with Rust
156
-
157
- This implementation closely follows Rust's Result type design:
158
-
159
- | Rust | PHP Result |
160
- | ------| ------------|
161
- | ` Result<T, E> ` | ` Result<T, E> ` |
162
- | ` Ok(T) ` | ` new Ok(T) ` |
163
- | ` Err(E) ` | ` new Err(E) ` |
164
- | ` is_ok() ` | ` isOk() ` |
165
- | ` is_err() ` | ` isErr() ` |
166
- | ` unwrap() ` | ` unwrap() ` |
167
- | ` unwrap_or() ` | ` unwrapOr() ` |
168
- | ` map() ` | ` map() ` |
169
- | ` and_then() ` | ` andThen() ` |
170
- | ` match ` expression | ` match() ` method |
171
-
172
155
## Development
173
156
174
157
### Running Tests
You can’t perform that action at this time.
0 commit comments