1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
* Copyright (c) 2026 Ankit Chaubey <ankitchaubey.dev@gmail.com>
* https://github.com/ankit-chaubey
*
* Project: ferogram
* Website: https://ferogram.dev
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
* This file may not be copied, modified, or distributed except according
* to those terms.
*/
//! Auto-generated Telegram API types, functions, and enums, regenerated from
//! `api.tl` on every build (current layer exposed as the `LAYER` constant).
//!
//! This crate is part of [ferogram](https://crates.io/crates/ferogram), an async Rust
//! MTProto client built by [Ankit Chaubey](https://github.com/ankit-chaubey).
//!
//! - Channel: [t.me/Ferogram](https://t.me/Ferogram)
//! - Chat: [t.me/FerogramChat](https://t.me/FerogramChat)
//!
//! The entire contents are generated at build time from the TL schema in `tl/`.
//! Do not edit the generated source by hand.
//!
//! Most users access this through `ferogram::tl`, which re-exports everything
//! here. Use this crate directly only if you are building on top of the raw TL
//! layer without the high-level `ferogram` client.
//!
//! # Modules
//!
//! | Module | Contents |
//! |---|---|
//! | [`types`] | Concrete constructors as `struct`s (bare types) |
//! | [`functions`] | RPC functions as `struct`s implementing [`RemoteCall`] |
//! | [`enums`] | Boxed types as `enum`s implementing [`Deserializable`] |
//!
//! # Serialization
//!
//! Every type in [`types`] and every function in [`functions`] implements
//! [`Serializable`]. Every enum in [`enums`] implements [`Deserializable`].
//!
//! ```rust,no_run
//! # #[cfg(feature = "tl-api")]
//! # {
//! use ferogram_tl_types::{functions, Serializable};
//!
//! let req = functions::help::GetConfig {};
//! let bytes = req.to_bytes();
//! // bytes is the TL-serialized wire form, ready to send over MTProto.
//! # }
//! ```
//!
//! # Feature flags
//!
//! | Flag | Default | Effect |
//! |---|---|---|
//! | `tl-api` | yes | Current-layer API schema types (`api.tl`) |
//! | `tl-mtproto` | no | MTProto internal schema types (`mtproto.tl`, DH, transport, etc.) |
//! | `impl-debug` | yes | `#[derive(Debug)]` on all generated types |
//! | `impl-from-type` | yes | `From<types::T> for enums::E` |
//! | `impl-from-enum` | yes | `TryFrom<enums::E> for types::T` |
//! | `field-accessors` | yes | Generated getter methods for struct fields |
//! | `deserializable-functions` | no | [`Deserializable`] on function types too |
//! | `name-for-id` | no | `name_for_id(u32) -> Option<&'static str>` for debug printing |
//! | `impl-serde` | no | `serde::Serialize` / `Deserialize` on generated types |
//!
//! # Updating to a new TL layer
//!
//! Replace `tl/api.tl` with the new schema and run `cargo build`.
//! The build script regenerates all source. The `LAYER` constant reflects
//! the current layer number.
pub use ;
pub use name_for_id;
pub use ;
pub use Serializable;
/// Bare vector: `vector` (lowercase) as opposed to the boxed `Vector`.
///
/// Used in rare cases where Telegram sends a length-prefixed list without
/// the usual `0x1cb5c415` constructor ID header.
;
/// Opaque blob of bytes that should be passed through without interpretation.
///
/// Returned by functions whose response type is generic (e.g. `X`).
;
// Core traits
/// Every generated type has a unique 32-bit constructor ID.
/// Marks a function type that can be sent to Telegram as an RPC call.
///
/// `Return` is the type Telegram will respond with.