## `another-option` This package provides `Opt` as an alternative to `Option`. Why would you want another option? `Opt` provides advantages when: 1. the generic type, `T`, is expensive to allocate, and 2. mutation between `None` and `Some(...)` is frequent. ### Examples Since Rust's built-in `Option` is an enum, it will drop its `Some(...)` value when `None` is assigned. ```rust let mut option: Option = Some(String::with_capacity(1024)); option = None; // drops the string option = Some(String::with_capacity(1024)); // allocation ``` Since `Opt` always owns the value, even when empty, the value can be reused without drops or allocations: ```rust use crate::another_option::Opt; let mut opt: Opt = Opt::some(String::with_capacity(1024)); opt.map_in_place(|v| v.push_str("value")); opt.set_none(); // does *not* drop the string opt.set_some(); assert_eq!(opt.unwrap(), String::from("value")); ```