Expand description
This library serves as the session interface for all of the crucial data that other Telegram libraries would need to operate correctly, including:
- Datacenter addresses, to know where to connect.
- Permanent Authorization Keys bound to each datacenter.
- Update state, in order to catch up on missed updates while offline.
- Cached peers, necessary to interact with the API.
Most of the data is bound to the specific session, and cannot be reused outside of it. The exceptions are datacenter addresses, and update state which is actually account-bound.
To use with other libraries, you will want to instantiate one of the
storages, which are what implement the Session trait.
To convert between storages, you can use the SessionData as an
intermediate step, and use its From implementations in combination
with SessionData::import_to. Note that the From implementation
will not copy all of the data, only that which is necessary.
Modules§
- defs
- Session type definitions.
- storages
- Built-in
crate::Sessionstorages. - updates
- Logic and types for Working with Updates.
Structs§
- Peer
Auth Cache Deprecated - In-memory chat cache, mapping peers to their respective access hashes.
- Session
Data - In-memory representation of the entire
Sessionstate.
Traits§
- Session
- The main interface to interact with the different
crate::storages.