Trait hko::API

source ·
pub trait API {
    const BASE: &'static str;
    const DATATYPE: &'static str;

    // Provided method
    fn url(lang: Lang) -> String { ... }
}
Expand description

API trait for all data types.

Required Associated Constants§

source

const BASE: &'static str

source

const DATATYPE: &'static str

Provided Methods§

source

fn url(lang: Lang) -> String

Generates the URL for retrieving the data, in specified language.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl API for FeltReport

source§

const BASE: &'static str = "earthquake"

source§

const DATATYPE: &'static str = "feltearthquake"

source§

impl API for Message

source§

const BASE: &'static str = "earthquake"

source§

const DATATYPE: &'static str = "qem"

source§

impl API for Current

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "rhrread"

source§

impl API for Local

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "flw"

source§

impl API for NineDay

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "fnd"

source§

impl API for Tips

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "swt"

source§

impl API for Info

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "warningInfo"

source§

impl API for Summary

source§

const BASE: &'static str = "weather"

source§

const DATATYPE: &'static str = "warnsum"