telegram-webapp-sdk 0.4.0

Telegram WebApp SDK for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com>
// SPDX-License-Identifier: MIT

use inventory::collect;

/// Represents a single routable page.
#[derive(Copy, Clone)]
pub struct Page {
    pub path:    &'static str,
    pub handler: fn()
}

collect!(Page);

/// Returns iterator over registered pages.
pub fn iter() -> inventory::iter<Page> {
    inventory::iter::<Page>
}