(&self)
| 76 | } |
| 77 | |
| 78 | fn enum_cases(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_> { |
| 79 | let Self::Enum(enum_) = self else { |
| 80 | return Box::new(std::iter::empty()); |
| 81 | }; |
| 82 | Box::new(enum_.names().map(Into::into)) |
| 83 | } |
| 84 | |
| 85 | fn option_some_type(&self) -> Option<Self> { |
| 86 | maybe_unwrap_type!(self, Self::Option).map(|o| o.ty()) |