1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/// Represent URL visibility state. #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] // todo: #[non_exhaustive] pub enum UrlVisibility { /// The URL is visible. Shown, /// The URL is hidden. Hidden, } impl UrlVisibility { /// Checks if the visibility is set to `Shown`. pub fn is_shown(self) -> bool { self == UrlVisibility::Shown } /// Checks if the visibility is set to `Hidden`. pub fn is_hidden(self) -> bool { self == UrlVisibility::Hidden } }