Create a temporal value with explicit time bounds
(
value: Value,
valid_from: DateTime<Utc>,
valid_to: Option<DateTime<Utc>>,
transaction_time: DateTime<Utc>,
)
| 36 | |
| 37 | /// Create a temporal value with explicit time bounds |
| 38 | pub fn with_bounds( |
| 39 | value: Value, |
| 40 | valid_from: DateTime<Utc>, |
| 41 | valid_to: Option<DateTime<Utc>>, |
| 42 | transaction_time: DateTime<Utc>, |
| 43 | ) -> Self { |
| 44 | Self { |
| 45 | value: Box::new(value), |
| 46 | valid_from, |
| 47 | valid_to, |
| 48 | transaction_time, |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /// Check if this value is valid at a specific point in time |
| 53 | pub fn is_valid_at(&self, time: DateTime<Utc>) -> bool { |
nothing calls this directly
no outgoing calls
no test coverage detected