Skip to main content

nominal_api/conjure/objects/persistent/compute/api/
append_only_config.rs

1/// Defines the append results from the websocket.
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 AppendOnlyConfig {
18    #[serde(rename = "decimateResults")]
19    decimate_results: bool,
20}
21impl AppendOnlyConfig {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(decimate_results: bool) -> Self {
25        Self::builder().decimate_results(decimate_results).build()
26    }
27    /// Specifies whether the returned results should be decimated.
28    /// If this is false, the client may receive a `SubscriptionCreationError` if the data rate is too high
29    /// and responses must be decimated.
30    #[inline]
31    pub fn decimate_results(&self) -> bool {
32        self.decimate_results
33    }
34}