Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
value_table_staleness_config.rs

1/// Configuration for showing staleness of values while streaming
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash,
12    Copy
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct ValueTableStalenessConfig {
18    #[builder(default, into)]
19    #[serde(rename = "hideStaleness", skip_serializing_if = "Option::is_none", default)]
20    hide_staleness: Option<bool>,
21}
22impl ValueTableStalenessConfig {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new() -> Self {
26        Self::builder().build()
27    }
28    /// If true, will not show any indication of staleness. Defaults to false
29    #[inline]
30    pub fn hide_staleness(&self) -> Option<bool> {
31        self.hide_staleness.as_ref().map(|o| *o)
32    }
33}