Skip to main content

Crate use_weather_forecast

Crate use_weather_forecast 

Source
Expand description

§use-weather-forecast

Primitive forecast vocabulary.

use-weather-forecast models forecast identifiers, forecast kinds, forecast confidence labels, forecast horizons, and descriptive forecast periods. It does not generate forecasts, fetch forecast data, score forecast skill, or implement alerting systems.

use use_weather_forecast::{ForecastConfidence, ForecastHorizon, ForecastId, ForecastKind};

let identifier = ForecastId::new("short-range-001").unwrap();
let horizon = ForecastHorizon::new(24);

assert_eq!(identifier.as_str(), "short-range-001");
assert_eq!(horizon.hours(), 24);
assert_eq!(ForecastKind::ShortRange.to_string(), "short-range");
assert_eq!(ForecastConfidence::High.to_string(), "high");

Structs§

ForecastHorizon
Forecast horizon stored as hours.
ForecastId
A non-empty forecast identifier.
ForecastPeriod
A non-empty descriptive forecast period label.

Enums§

ForecastConfidence
Stable forecast confidence vocabulary.
ForecastConfidenceParseError
Error returned when parsing forecast confidence fails.
ForecastKind
Stable forecast kind vocabulary.
ForecastKindParseError
Error returned when parsing forecast kinds fails.
ForecastValueError
Errors returned by forecast constructors.