https://github.com/mandober/rust-maybe-type
Rust: Option's doppelganger, the Maybe type
https://github.com/mandober/rust-maybe-type
rust rust-exercise
Last synced: about 2 months ago
JSON representation
Rust: Option's doppelganger, the Maybe type
- Host: GitHub
- URL: https://github.com/mandober/rust-maybe-type
- Owner: mandober
- Created: 2018-02-24T14:16:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-24T14:52:42.000Z (over 8 years ago)
- Last Synced: 2025-02-23T15:37:02.781Z (over 1 year ago)
- Topics: rust, rust-exercise
- Language: Rust
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maybe
- lang: Rust
- date: 2017-12-11
- type: exercise
- desc: Option's doppelganger, the Maybe type (just for exercise)
Implementation of the `Maybe` type, exactly the same thing as the `Option`, purely as get-intimate-with-impl-details sort of exercise. Heavily commented.
```rust
pub enum Maybe {
Just(T),
Nothing
}
```
[Source code][opt] of `Option` in `libcore`.
[opt]: https://doc.rust-lang.org/src/core/option.rs.html