Skip to main content

ferogram_mtproto/
lib.rs

1// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3//
4// ferogram: async Telegram MTProto client in Rust
5// https://github.com/ankit-chaubey/ferogram
6//
7// Based on layer: https://github.com/ankit-chaubey/layer
8// Follows official Telegram client behaviour (tdesktop, TDLib).
9//
10// If you use or modify this code, keep this notice at the top of your file
11// and include the LICENSE-MIT or LICENSE-APACHE file from this repository:
12// https://github.com/ankit-chaubey/ferogram
13
14#![cfg_attr(docsrs, feature(doc_cfg))]
15#![doc(html_root_url = "https://docs.rs/ferogram-mtproto/0.4.6")]
16//! MTProto session and transport abstractions.
17//!
18//! This crate handles:
19//! * Message framing (sequence numbers, message IDs)
20//! * Plaintext transport (for initial handshake / key exchange)
21//! * Encrypted transport skeleton (requires a crypto backend)
22//!
23//! It is intentionally transport-agnostic: bring your own TCP/WebSocket.
24
25#![deny(unsafe_code)]
26#![warn(missing_docs)]
27
28pub mod authentication;
29pub mod encrypted;
30pub mod message;
31pub mod session;
32pub mod transport;
33
34pub use authentication::{Finished, finish, step1, step2, step3};
35pub use encrypted::EncryptedSession;
36pub use message::{Message, MessageId};
37pub use session::Session;