ferogram_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// 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/// A flag reference inside a parameter type, e.g. `flags.0` in `flags.0?true`.
15#[derive(Clone, Debug, PartialEq, Eq, Hash)]
16pub struct Flag {
17 /// The name of the flags field that holds this bit (usually `"flags"`).
18 pub name: String,
19 /// The bit index (0-based).
20 pub index: u32,
21}