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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
use cratePrice;
use ;
/// A struct representing a price range with a lower and upper price bound.
///
/// The `PriceRange` struct is used to define a range of prices within a
/// specific lower and upper limit. This can be helpful in scenarios such
/// as filtering items, setting bounds for pricing algorithms, or defining
/// ranges for user-input limits.
///
/// ## Fields
///
/// * `lower_price` - The minimum price in the range. Represents the lower bound value.
/// * `upper_price` - The maximum price in the range. Represents the upper bound value.
///
/// ## Traits
///
/// The `PriceRange` struct derives several useful traits:
///
/// * `Debug` - Enables formatting the structure using the `{:?}` formatter for debugging purposes.
/// * `Clone` - Allows creating a duplicate of a `PriceRange` instance.
/// * `Serialize` - Supports serializing the struct into formats such as JSON, typically for storage or communication.
/// * `Deserialize` - Supports constructing a `PriceRange` instance from serialized data (e.g., JSON).
///
///
/// Note: The `Price` type must be predefined with your desired implementation
/// in order to use this struct effectively.
/// Represents a price range.