ferogram_tl_parser/tl/flag.rs
1// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
2//
3// ferogram: async Telegram MTProto client in Rust
4// https://github.com/ankit-chaubey/ferogram
5//
6// Licensed under either the MIT License or the Apache License 2.0.
7// See the LICENSE-MIT or LICENSE-APACHE file in this repository:
8// https://github.com/ankit-chaubey/ferogram
9//
10// Feel free to use, modify, and share this code.
11// Please keep this notice when redistributing.
12
13#[derive(Clone, Debug, PartialEq, Eq, Hash)]
14/// A conditional-field flag reference: the flags field name and the bit index.
15pub struct Flag {
16 /// The name of the flags field that holds this bit (usually `"flags"`).
17 pub name: String,
18 /// The bit index (0-based).
19 pub index: u32,
20}