//! Checkbox persistent state.
/// Persistent state for a checkbox widget.
#[derive(Debug, Default, Clone)]pubstructCheckboxState{/// Whether the checkbox is currently checked.
pubchecked:bool,
}implCheckboxState{/// Flip the checked value and return the new state.
pubfntoggle(&mutself)->bool{self.checked =!self.checked;self.checked
}}