displaythis-impl 1.0.23

Implementation detail of the `displaythis` crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::ast::Enum;

impl Enum<'_> {
    pub(crate) fn has_display(&self) -> bool {
        self.attrs.display.is_some()
            || self
                .variants
                .iter()
                .any(|variant| variant.attrs.display.is_some())
    }
}