layer-tl-types 0.1.1

Auto-generated Telegram TL types — constructors, functions, enums (Layer 222)
Documentation

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 structs
[functions] RPC functions as structs implementing [RemoteCall]
[enums] Boxed types as enums implementing [Deserializable]

Raw API usage

use layer_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.