4 ms·
The Rust Enum is a more generalized data structure, which aside from being able to provide your usual Enum functionalities, can also contain members with type p
by Daishiman 13y ago
The Rust Enum is a more generalized data structure, which aside from being able to provide your usual Enum functionalities, can also contain members with type parameters.
The cool thing is that all this functionality is accessible through the match() syntax, which exhaustively checks all possible forms the Enum can take, thus making data access completely safe.