Skip to main content

nominal_api/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)]
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 ThemeAwareImage {
16    #[serde(rename = "light")]
17    light: super::rids::AttachmentRid,
18    #[serde(rename = "dark")]
19    dark: super::rids::AttachmentRid,
20}
21impl ThemeAwareImage {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(
25        light: super::rids::AttachmentRid,
26        dark: super::rids::AttachmentRid,
27    ) -> Self {
28        Self::builder().light(light).dark(dark).build()
29    }
30    #[inline]
31    pub fn light(&self) -> &super::rids::AttachmentRid {
32        &self.light
33    }
34    #[inline]
35    pub fn dark(&self) -> &super::rids::AttachmentRid {
36        &self.dark
37    }
38}