I\'m trying to write a trait that will allow me to "unwrap" multiple nested Option>>> to a single Option
Option>>>
Option
If you have many Options and you want to avoid chaining unwraps, you can use match:
unwrap
match
let val = Some(Some(Some(5))); let res = match val { Some(Some(Some(v))) => v, _ => 0, // panic or default };