Skip to main content

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

1/// Returns within halfWidthSec seconds of the playhead in each direction.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith,
8    Copy
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct SpatialTimeWindowSymmetric {
15    #[serde(rename = "halfWidthSec")]
16    #[derive_with(with = conjure_object::private::DoubleWrapper)]
17    half_width_sec: f64,
18}
19impl SpatialTimeWindowSymmetric {
20    /// Constructs a new instance of the type.
21    #[inline]
22    pub fn new(half_width_sec: f64) -> Self {
23        Self::builder().half_width_sec(half_width_sec).build()
24    }
25    #[inline]
26    pub fn half_width_sec(&self) -> f64 {
27        self.half_width_sec
28    }
29}