Skip to main content

layer_tl_parser/tl/
flag.rs

1// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4// NOTE:
5// The "Layer" project is no longer maintained or supported.
6// Its original purpose for personal SDK/APK experimentation and learning
7// has been fulfilled.
8//
9// Please use Ferogram instead:
10// https://github.com/ankit-chaubey/ferogram
11// Ferogram will receive future updates and development, although progress
12// may be slower.
13//
14// Ferogram is an async Telegram MTProto client library written in Rust.
15// Its implementation follows the behaviour of the official Telegram clients,
16// particularly Telegram Desktop and TDLib, and aims to provide a clean and
17// modern async interface for building Telegram clients and tools.
18
19/// A flag reference inside a parameter type, e.g. `flags.0` in `flags.0?true`.
20#[derive(Clone, Debug, PartialEq, Eq, Hash)]
21pub struct Flag {
22    /// The name of the flags field that holds this bit (usually `"flags"`).
23    pub name: String,
24    /// The bit index (0-based).
25    pub index: u32,
26}