Skip to main content

nominal_api/conjure/objects/storage/writer/api/
log_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 LogPoint {
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    #[builder(custom(type = super::LogValue, convert = Box::new))]
22    #[serde(rename = "value")]
23    value: Box<super::LogValue>,
24}
25impl LogPoint {
26    /// Constructs a new instance of the type.
27    #[inline]
28    pub fn new(
29        timestamp: super::super::super::super::api::Timestamp,
30        value: super::LogValue,
31    ) -> Self {
32        Self::builder().timestamp(timestamp).value(value).build()
33    }
34    #[inline]
35    pub fn timestamp(&self) -> &super::super::super::super::api::Timestamp {
36        &*self.timestamp
37    }
38    #[inline]
39    pub fn value(&self) -> &super::LogValue {
40        &*self.value
41    }
42}