Skip to main content

weatherkit/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![allow(
4    clippy::cargo_common_metadata,
5    clippy::cast_precision_loss,
6    clippy::doc_markdown,
7    clippy::missing_const_for_fn,
8    clippy::missing_errors_doc,
9    clippy::missing_panics_doc,
10    clippy::module_name_repetitions,
11    clippy::must_use_candidate,
12    clippy::needless_pass_by_value,
13    clippy::redundant_pub_crate,
14    clippy::return_self_not_must_use,
15    clippy::struct_field_names,
16    clippy::type_complexity,
17    clippy::use_self
18)]
19
20pub mod availability_kind;
21pub mod changes;
22pub mod current_weather;
23pub mod daily_forecast;
24pub mod error;
25pub mod ffi;
26pub mod hourly_forecast;
27pub mod minute_forecast;
28pub mod moon_events;
29pub mod pressure;
30mod private;
31pub mod service;
32pub mod statistics;
33pub mod sun_events;
34pub mod weather;
35pub mod weather_alert;
36
37#[cfg(feature = "async")]
38pub mod async_api;
39pub mod weather_attribution;
40pub mod weather_condition;
41
42pub use availability_kind::{AvailabilityKind, AvailabilityKindDescriptor, WeatherAvailability};
43pub use changes::{
44    Deviation, HistoricalComparison, HistoricalComparisons, LengthUnit, Percentiles,
45    TemperatureUnit, Trend, TrendBaseline, TrendBaselineKind, WeatherChange,
46    WeatherChangeDirection, WeatherChanges,
47};
48pub use current_weather::{
49    CloudCoverByAltitude, CurrentWeather, UVExposureCategory, UVExposureCategoryDescriptor,
50    UVIndex, Wind, WindCompassDirection, WindCompassDirectionDescriptor,
51};
52pub use daily_forecast::{
53    DailyForecast, DayForecast, DayPartForecast, PrecipitationAmountByType, SnowfallAmount,
54};
55pub use error::{
56    WeatherError, WeatherErrorDescriptor, WeatherKitError, WEATHERKIT_BRIDGE_ERROR_DOMAIN,
57};
58pub use hourly_forecast::{HourForecast, HourlyForecast};
59pub use minute_forecast::{MinuteForecast, MinuteForecastCollection};
60pub use moon_events::{MoonEvents, MoonPhase, MoonPhaseDescriptor};
61pub use pressure::{Pressure, PressureTrend, PressureTrendDescriptor};
62pub use service::{
63    CLLocation, DateInterval, Weather, WeatherMetadata, WeatherQuery, WeatherQueryResult,
64    WeatherService,
65};
66pub use statistics::{
67    DailyWeatherStatistics, DailyWeatherStatisticsQuery, DailyWeatherStatisticsResult,
68    DailyWeatherSummary, DailyWeatherSummaryQuery, DailyWeatherSummaryResult,
69    DayPrecipitationStatistics, DayPrecipitationSummary, DayTemperatureStatistics,
70    DayTemperatureSummary, HourTemperatureStatistics, HourlyWeatherStatistics,
71    HourlyWeatherStatisticsQuery, MonthPrecipitationStatistics, MonthTemperatureStatistics,
72    MonthlyWeatherStatistics, MonthlyWeatherStatisticsQuery, MonthlyWeatherStatisticsResult,
73};
74pub use sun_events::SunEvents;
75pub use weather_alert::{WeatherAlert, WeatherSeverity, WeatherSeverityDescriptor};
76pub use weather_attribution::WeatherAttribution;
77pub use weather_condition::{
78    Precipitation, PrecipitationDescriptor, WeatherCondition, WeatherConditionDescriptor,
79};
80
81/// Common imports.
82pub mod prelude {
83    pub use crate::availability_kind::{
84        AvailabilityKind, AvailabilityKindDescriptor, WeatherAvailability,
85    };
86    pub use crate::changes::{
87        Deviation, HistoricalComparison, HistoricalComparisons, LengthUnit, Percentiles,
88        TemperatureUnit, Trend, TrendBaseline, TrendBaselineKind, WeatherChange,
89        WeatherChangeDirection, WeatherChanges,
90    };
91    pub use crate::current_weather::{
92        CloudCoverByAltitude, CurrentWeather, UVExposureCategory, UVExposureCategoryDescriptor,
93        UVIndex, Wind, WindCompassDirection, WindCompassDirectionDescriptor,
94    };
95    pub use crate::daily_forecast::{
96        DailyForecast, DayForecast, DayPartForecast, PrecipitationAmountByType, SnowfallAmount,
97    };
98    pub use crate::error::{
99        WeatherError, WeatherErrorDescriptor, WeatherKitError, WEATHERKIT_BRIDGE_ERROR_DOMAIN,
100    };
101    pub use crate::hourly_forecast::{HourForecast, HourlyForecast};
102    pub use crate::minute_forecast::{MinuteForecast, MinuteForecastCollection};
103    pub use crate::moon_events::{MoonEvents, MoonPhase, MoonPhaseDescriptor};
104    pub use crate::pressure::{Pressure, PressureTrend, PressureTrendDescriptor};
105    pub use crate::service::{
106        CLLocation, DateInterval, Weather, WeatherMetadata, WeatherQuery, WeatherQueryResult,
107        WeatherService,
108    };
109    pub use crate::statistics::{
110        DailyWeatherStatistics, DailyWeatherStatisticsQuery, DailyWeatherStatisticsResult,
111        DailyWeatherSummary, DailyWeatherSummaryQuery, DailyWeatherSummaryResult,
112        DayPrecipitationStatistics, DayPrecipitationSummary, DayTemperatureStatistics,
113        DayTemperatureSummary, HourTemperatureStatistics, HourlyWeatherStatistics,
114        HourlyWeatherStatisticsQuery, MonthPrecipitationStatistics, MonthTemperatureStatistics,
115        MonthlyWeatherStatistics, MonthlyWeatherStatisticsQuery, MonthlyWeatherStatisticsResult,
116    };
117    pub use crate::sun_events::SunEvents;
118    pub use crate::weather_alert::{WeatherAlert, WeatherSeverity, WeatherSeverityDescriptor};
119    pub use crate::weather_attribution::WeatherAttribution;
120    pub use crate::weather_condition::{
121        Precipitation, PrecipitationDescriptor, WeatherCondition, WeatherConditionDescriptor,
122    };
123}