grammers-tl-types 0.1.0

Rust definitions for Telegram's API types and functions.
Documentation

This library contains the Rust definitions for Telegram's types and functions in the form of struct and enum. All of them implement Serializable, and by default only types implement Deserializable.

Features

The default feature set is intended to make the use of the library comfortable, and not intended to be minimal in code size. If you need a smaller libary or are concerned about build-times, consider disabling some of the default features.

The default feature set includes:

  • tl-api.
  • impl-debug.
  • impl-from-type.
  • impl-from-enum.

The available features are:

  • tl-api: generates code for the api.tl. This is what high-level libraries often need.

  • mtproto-api: generates code for the mtproto.tl. Only useful for low-level libraries.

  • deserializable-functions: implements Deserializable for functions. This might be of interest for server implementations, which need to deserialize the client's requests, but is otherwise not required.

  • impl-debug: implements Debug for the generated code.

  • impl-from-type: implements From<Type> for Enum.

  • impl-from-enum: implements TryFrom<Enum> for Type.