hko 1.13.0

Rust library for Hong Kong Observatory Open Data API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2021 - 2025 GreenYun Organization
// SPDX-License-Identifier: MIT

macro_rules! enum_lang_matches {
    ($case:expr, $lang:expr,
        $($val:path => $en:expr, $tc:expr, $sc:expr),+ $(,)?) => {
        match $case {
            $($val => match $lang {
                crate::common::Lang::EN => $en,
                crate::common::Lang::TC => $tc,
                crate::common::Lang::SC => $sc,
            }),
            +
        }
    };
}

pub(crate) use enum_lang_matches;