An open API service indexing awesome lists of open source software.

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

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