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
//! # Common utils
use AsSnakeCase;
/// Since [`protocol`](crate::protocol) entities are immutable by design (after all, they just
/// represent XML definitions), we use
/// [builder](https://rust-unofficial.github.io/patterns/patterns/creational/builder.html) pattern
/// instead of constructor.
/// Subject of the `builder` pattern.
///
/// See: [`Builder`].
/// Converts dialect `name` into its canonical form (`ID`) used as a key in
/// [`Protocol::dialects`](crate::protocol::Protocol::dialects).
///
/// See [`DialectXmlDefinition`](crate::parser::DialectXmlDefinition) and
/// [`Dialect::canonical_name`](crate::protocol::Dialect::canonical_name) for details.
pub