Skip to main content

nominal_api_conjure/conjure/objects/api/
theme_aware_image.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    conjure_object::log_safety::derive::LogSafe
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct ThemeAwareImage {
17    #[serde(rename = "light")]
18    light: super::rids::AttachmentRid,
19    #[serde(rename = "dark")]
20    dark: super::rids::AttachmentRid,
21}
22impl ThemeAwareImage {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        light: super::rids::AttachmentRid,
27        dark: super::rids::AttachmentRid,
28    ) -> Self {
29        Self::builder().light(light).dark(dark).build()
30    }
31    #[inline]
32    pub fn light(&self) -> &super::rids::AttachmentRid {
33        &self.light
34    }
35    #[inline]
36    pub fn dark(&self) -> &super::rids::AttachmentRid {
37        &self.dark
38    }
39}