egui_json_tree 0.15.0

An interactive JSON tree visualiser for egui, with search and highlight functionality.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Setting for the visibility and interactivity of the toggle buttons for expanding/collapsing objects and arrays.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub enum ToggleButtonsState {
    #[default]
    VisibleEnabled,
    VisibleDisabled,
    Hidden,
}

impl ToggleButtonsState {
    pub(crate) fn enabled(&self) -> Option<bool> {
        match self {
            ToggleButtonsState::VisibleEnabled => Some(true),
            ToggleButtonsState::VisibleDisabled => Some(false),
            ToggleButtonsState::Hidden => None,
        }
    }
}