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
/// Builder for creating `BitTiming` programmatically.
///
/// This builder allows you to construct bit timing configuration when building
/// DBC files programmatically.
///
/// # Examples
///
/// ```rust,no_run
/// use dbc_rs::BitTimingBuilder;
///
/// // Empty bit timing (most common)
/// let bt = BitTimingBuilder::new().build()?;
/// assert!(bt.is_empty());
///
/// // With baudrate only
/// let bt = BitTimingBuilder::new()
/// .baudrate(500000)
/// .build()?;
/// assert_eq!(bt.baudrate(), Some(500000));
///
/// // With full timing parameters
/// let bt = BitTimingBuilder::new()
/// .baudrate(500000)
/// .btr1(1)
/// .btr2(2)
/// .build()?;
/// # Ok::<(), dbc_rs::Error>(())
/// ```
///
/// # Feature Requirements
///
/// This builder requires the `std` feature to be enabled.