dbc_rs/version/builder/
mod.rs

1/// Builder for creating `Version` programmatically.
2///
3/// This builder allows you to construct version strings when building DBC files
4/// programmatically by specifying a complete version string.
5///
6/// # Examples
7///
8/// ```rust,no_run
9/// use dbc_rs::VersionBuilder;
10///
11/// // Direct version string
12/// let version = VersionBuilder::new().version("1.0").build()?;
13/// assert_eq!(version.as_str(), "1.0");
14///
15/// // Semantic versioning (as a string)
16/// let version2 = VersionBuilder::new()
17///     .version("1.2.3")
18///     .build()?;
19/// assert_eq!(version2.as_str(), "1.2.3");
20/// # Ok::<(), dbc_rs::Error>(())
21/// ```
22///
23/// # Feature Requirements
24///
25/// This builder requires the `std` feature to be enabled.
26#[derive(Debug)]
27pub struct VersionBuilder {
28    pub(crate) version: Option<String>,
29}
30
31mod build;
32mod impls;