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 theapi.tl
. This is what high-level libraries often need. -
mtproto-api
: generates code for themtproto.tl
. Only useful for low-level libraries. -
deserializable-functions
: implementsDeserializable
forfunctions
. This might be of interest for server implementations, which need to deserialize the client's requests, but is otherwise not required. -
impl-debug
: implementsDebug
for the generated code. -
impl-from-type
: implementsFrom<Type> for Enum
. -
impl-from-enum
: implementsTryFrom<Enum> for Type
.