Expand description
Weather domain logic for the weathervane family of applications.
This crate is purely reactive: no polling, no timers, no config storage. It exposes async functions that frontends call when they decide it’s time. The frontend owns all scheduling, config persistence, and passes the relevant parameters (coordinates, units, etc.) on each call.
Re-exports§
pub use air_quality::AirQualityData;pub use air_quality::AqiCategory;pub use air_quality::AqiStandard;pub use air_quality::EuAqiCategory;pub use air_quality::UsAqiCategory;pub use alerts::Alert;pub use alerts::AlertSeverity;pub use codes::CompassDirection;pub use codes::WeatherCondition;pub use error::Error;pub use error::Result;pub use location::DetectedLocation;pub use location::LocationResult;pub use location::SavedLocation;pub use network::NetworkEvent;pub use pollen::PollenData;pub use sleep::SleepEvent;pub use time::ParsedDate;pub use units::MeasurementSystem;pub use units::PressureUnit;pub use units::TemperatureUnit;pub use weather::CurrentWeather;pub use weather::DailyForecast;pub use weather::HourlyForecast;pub use weather::WeatherData;pub use air_quality::fetch_air_quality;pub use alerts::fetch_alerts;pub use location::detect_location;pub use location::search_city;pub use location::uses_imperial_units;pub use network::network_stream;pub use pollen::fetch_pollen;pub use sleep::sleep_stream;pub use time::format_hour;pub use time::format_time;pub use time::is_night_time;pub use weather::fetch_weather;
Modules§
- air_
quality - Air quality data and AQI categories for US and European standards.
- alerts
- Weather alerts from regional providers (NWS, MeteoAlarm, ECCC, BOM).
- codes
- WMO weather codes and compass direction mappings.
- error
- Error types for weathervane operations.
- location
- Location search, detection, and bookmarking.
- network
- Network connectivity monitoring via NetworkManager D-Bus signals.
- pollen
- Pollen concentrations from Open-Meteo’s air-quality endpoint.
- sleep
- Suspend and resume detection via systemd-logind D-Bus signals.
- time
- Date and time parsing for ISO timestamps from the weather API.
- units
- Unit types and conversions for temperature, pressure, and measurement systems.
- weather
- Weather data types and fetching from the Open-Meteo API.
Enums§
- Region
- Geographic region for alert provider and AQI standard selection.
Functions§
- detect_
region - Detects geographic region from coordinates for alert provider selection.
- reset_
http_ client - Throws away the shared HTTP client. Next request builds a new one.