Extract as datetime if possible (UTC only)
(&self)
| 190 | |
| 191 | /// Extract as datetime if possible (UTC only) |
| 192 | pub fn as_datetime(&self) -> Option<&DateTime<Utc>> { |
| 193 | match self { |
| 194 | Value::DateTime(dt) => Some(dt), |
| 195 | Value::DateTimeWithNamedTz(_, dt) => Some(dt), |
| 196 | _ => None, |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /// Extract as datetime with fixed offset if possible |
| 201 | pub fn as_datetime_with_offset(&self) -> Option<&DateTime<FixedOffset>> { |
nothing calls this directly
no outgoing calls
no test coverage detected