1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/// Information about console history.
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct HistoryInfo {
    /// The number of commands kept in each history buffer.
    pub size: u32,
    /// The number of history buffers kept.
    pub number_of_buffers: u32,
    /// Should duplicate entries be stored in history buffers?
    pub duplicates_allowed: bool,
}

impl Default for HistoryInfo {
    /**
    Returns an empty HistoryInfo object.
    */
    fn default() -> Self {
        Self {
            size: 0,
            number_of_buffers: 0,
            duplicates_allowed: false,
        }
    }
}