Skip to main content

nominal_api/conjure/objects/scout/compute/api/
frame_reference.rs

1/// References a named frame in `Context.frameReferences`.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
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 FrameReference {
17    #[builder(custom(type = super::StringConstant, convert = Box::new))]
18    #[serde(rename = "name")]
19    name: Box<super::StringConstant>,
20}
21impl FrameReference {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(name: super::StringConstant) -> Self {
25        Self::builder().name(name).build()
26    }
27    /// Name of the frame reference to resolve from the context.
28    #[inline]
29    pub fn name(&self) -> &super::StringConstant {
30        &*self.name
31    }
32}