Skip to main content

nominal_api/conjure/objects/storage/writer/api/
int_point.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct IntPoint {
16    #[builder(
17        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
18    )]
19    #[serde(rename = "timestamp")]
20    timestamp: Box<super::super::super::super::api::Timestamp>,
21    #[serde(rename = "value")]
22    value: i32,
23}
24impl IntPoint {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new(
28        timestamp: super::super::super::super::api::Timestamp,
29        value: i32,
30    ) -> Self {
31        Self::builder().timestamp(timestamp).value(value).build()
32    }
33    #[inline]
34    pub fn timestamp(&self) -> &super::super::super::super::api::Timestamp {
35        &*self.timestamp
36    }
37    #[inline]
38    pub fn value(&self) -> i32 {
39        self.value
40    }
41}