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
// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
// SPDX-License-Identifier: MIT OR Apache-2.0
//
// ferogram: async Telegram MTProto client in Rust
// https://github.com/ankit-chaubey/ferogram
//
//
// If you use or modify this code, keep this notice at the top of your file
// and include the LICENSE-MIT or LICENSE-APACHE file from this repository:
// https://github.com/ankit-chaubey/ferogram
//! Generated Telegram API types, functions and enums.
//!
//! This crate is **auto-generated** from the TL schema files in `tl/`.
//! To update for a new API layer, replace `tl/api.tl` and rebuild.
//!
//! # Overview
//!
//! | Module | Contents |
//! |---------------|------------------------------------------------------------|
//! | [`types`] | Concrete constructors (bare types) as `struct`s |
//! | [`functions`] | RPC functions as `struct`s implementing [`RemoteCall`] |
//! | [`enums`] | Boxed types as `enum`s implementing [`Deserializable`] |
//!
//! # Raw API usage
//!
//! ```rust,no_run
//! use ferogram_tl_types::{functions, Serializable};
//!
//! let req = functions::auth::SendCode {
//! phone_number: "+1234567890".into(),
//! api_id: 12345,
//! api_hash: "abc".into(),
//! settings: Default::default(),
//! };
//!
//! let bytes = req.to_bytes();
//! // Send `bytes` over an MTProto connection...
//! ```
//!
//! # Updating to a new layer
//!
//! 1. Replace `tl/api.tl` with the new schema.
//! 2. `cargo build`: the build script regenerates everything.
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.