Expand description
Auto-generated Telegram API types, functions, and enums for TL Layer 224.
This crate is part of ferogram, an async Rust MTProto client built by Ankit Chaubey.
- Channel: t.me/Ferogram
- Chat: 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 structs (bare types) |
functions | RPC functions as structs implementing RemoteCall |
enums | Boxed types as enums implementing Deserializable |
§Serialization
Every type in types and every function in functions implements
Serializable. Every enum in enums implements Deserializable.
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 | Effect |
|---|---|
tl-api | Layer 224 API schema types (default in ferogram) |
tl-mtproto | MTProto internal types (DH, transport, etc.) |
name-for-id | name_for_id(u32) -> &'static str for debug printing |
§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.
Re-exports§
pub use deserialize::Cursor;pub use deserialize::Deserializable;pub use serialize::Serializable;
Modules§
Structs§
- Blob
- Opaque blob of bytes that should be passed through without interpretation.
- RawVec
- Bare vector:
vector(lowercase) as opposed to the boxedVector.
Constants§
- LAYER
- The API layer this code was generated from.
Traits§
- Identifiable
- Every generated type has a unique 32-bit constructor ID.
- Remote
Call - Marks a function type that can be sent to Telegram as an RPC call.
Functions§
- name_
for_ id name-for-id - Returns the TL name for a known constructor ID.