1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/// Export settings for a `.mat` file compatible with matlab.
#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Matfile {
#[builder(default, into)]
#[serde(
rename = "structHierarchicalDelimiter",
skip_serializing_if = "Option::is_none",
default
)]
struct_hierarchical_delimiter: Option<String>,
}
impl Matfile {
/// Constructs a new instance of the type.
#[inline]
pub fn new() -> Self {
Self::builder().build()
}
/// If present, exported column names are split on this single-character delimiter and written as nested
/// MATLAB structs. If absent, MATLAB export preserves the existing flat field behavior.
///
/// When this option is set, requested channel names must produce valid struct paths after splitting:
/// - the delimiter must be exactly one character;
/// - no path segment may be empty;
/// - the first path segment may not be `timestamps`, which is reserved for the generated timestamp column;
/// - no two channels may resolve to the same path;
/// - no channel may resolve to both a leaf and an object path, such as `a.b` and `a.b.c`.
///
/// If a grouped export produces multiple output columns for one requested channel, tag names and values
/// are appended to the final leaf field name only. The delimiter is not applied to those tag suffixes.
///
/// Other channel name segments are preserved as-is. Segments that are not valid MATLAB identifiers may
/// require dynamic field access in MATLAB.
#[inline]
pub fn struct_hierarchical_delimiter(&self) -> Option<&str> {
self.struct_hierarchical_delimiter.as_ref().map(|o| &**o)
}
}