Skip to main content

nominal_api/conjure/objects/module/
module_version_definition.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct ModuleVersionDefinition {
13    #[builder(default, list(item(type = super::Function)))]
14    #[serde(rename = "functions", skip_serializing_if = "Vec::is_empty", default)]
15    functions: Vec<super::Function>,
16}
17impl ModuleVersionDefinition {
18    /// Constructs a new instance of the type.
19    #[inline]
20    pub fn new() -> Self {
21        Self::builder().build()
22    }
23    /// The list of functions that resolve to derived series that appear in channel search after applying to an
24    /// asset. Limited to 100.
25    #[inline]
26    pub fn functions(&self) -> &[super::Function] {
27        &*self.functions
28    }
29}