nominal_api/conjure/objects/scout/channelvariables/api/
workbook_context.rs1#[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 WorkbookContext {
16 #[builder(
17 default,
18 map(
19 key(type = super::super::super::compute::api::VariableName),
20 value(type = super::VariableLocator)
21 )
22 )]
23 #[serde(
24 rename = "variables",
25 skip_serializing_if = "std::collections::BTreeMap::is_empty",
26 default
27 )]
28 variables: std::collections::BTreeMap<
29 super::super::super::compute::api::VariableName,
30 super::VariableLocator,
31 >,
32}
33impl WorkbookContext {
34 #[inline]
36 pub fn new() -> Self {
37 Self::builder().build()
38 }
39 #[inline]
40 pub fn variables(
41 &self,
42 ) -> &std::collections::BTreeMap<
43 super::super::super::compute::api::VariableName,
44 super::VariableLocator,
45 > {
46 &self.variables
47 }
48}