1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! Types related to inline queries.

use crate::types::{Location, User};
use serde::Deserialize;

pub mod id;
pub mod result;

pub use {id::Id, result::Result};

/// Represents an [`InlineQuery`].
///
/// [`InlineQuery`]: https://core.telegram.org/bots/api#inlinequery
#[derive(Debug, PartialEq, Clone, Deserialize)]
// todo: #[non_exhaustive]
pub struct InlineQuery {
    /// The ID of the query.
    pub id: Id,
    /// The user who sent the query.
    pub from: User,
    /// The location of the user, if enabled and allowed.
    pub location: Option<Location>,
    /// The query itself.
    pub query: String,
    /// The offset of the result to be returned.
    pub offset: String,
}