pub struct InlineQuery {
pub id: String,
pub from: BoxWrapper<Unbox<User>>,
pub query: String,
pub offset: String,
pub chat_type: Option<String>,
pub location: Option<BoxWrapper<Unbox<Location>>>,
}Expand description
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
Fields§
§id: StringUnique identifier for this query
from: BoxWrapper<Unbox<User>>Sender
query: StringText of the query (up to 256 characters)
offset: StringOffset of the results to be returned, can be controlled by the bot
chat_type: Option<String>Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
location: Option<BoxWrapper<Unbox<Location>>>Optional. Sender location, only for bots that request user location
Implementations§
Source§impl InlineQuery
impl InlineQuery
pub fn noskip(self) -> NoSkipInlineQuery
Source§impl InlineQuery
impl InlineQuery
pub fn new<A: Into<User>>( id: String, from: A, query: String, offset: String, ) -> Self
Sourcepub fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self
pub fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self
Text of the query (up to 256 characters)
Sourcepub fn get_offset<'a>(&'a self) -> &'a str
pub fn get_offset<'a>(&'a self) -> &'a str
Offset of the results to be returned, can be controlled by the bot
Sourcepub fn set_offset<'a>(&'a mut self, offset: String) -> &'a mut Self
pub fn set_offset<'a>(&'a mut self, offset: String) -> &'a mut Self
Offset of the results to be returned, can be controlled by the bot
Sourcepub fn get_chat_type<'a>(&'a self) -> Option<&'a str>
pub fn get_chat_type<'a>(&'a self) -> Option<&'a str>
Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
Sourcepub fn set_chat_type<'a>(
&'a mut self,
chat_type: Option<String>,
) -> &'a mut Self
pub fn set_chat_type<'a>( &'a mut self, chat_type: Option<String>, ) -> &'a mut Self
Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
Sourcepub fn get_location<'a>(&'a self) -> Option<&'a Location>
pub fn get_location<'a>(&'a self) -> Option<&'a Location>
Optional. Sender location, only for bots that request user location
Sourcepub fn set_location<'a>(
&'a mut self,
location: Option<Location>,
) -> &'a mut Self
pub fn set_location<'a>( &'a mut self, location: Option<Location>, ) -> &'a mut Self
Optional. Sender location, only for bots that request user location
Trait Implementations§
Source§impl Clone for InlineQuery
impl Clone for InlineQuery
Source§fn clone(&self) -> InlineQuery
fn clone(&self) -> InlineQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InlineQuery
impl Debug for InlineQuery
Source§impl Default for InlineQuery
impl Default for InlineQuery
Source§fn default() -> InlineQuery
fn default() -> InlineQuery
Source§impl<'de> Deserialize<'de> for InlineQuery
impl<'de> Deserialize<'de> for InlineQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<BoxWrapper<Box<InlineQuery>>> for InlineQuery
impl From<BoxWrapper<Box<InlineQuery>>> for InlineQuery
Source§fn from(t: BoxWrapper<Box<InlineQuery>>) -> Self
fn from(t: BoxWrapper<Box<InlineQuery>>) -> Self
Source§impl From<BoxWrapper<Unbox<InlineQuery>>> for InlineQuery
impl From<BoxWrapper<Unbox<InlineQuery>>> for InlineQuery
Source§fn from(t: BoxWrapper<Unbox<InlineQuery>>) -> Self
fn from(t: BoxWrapper<Unbox<InlineQuery>>) -> Self
Source§impl From<NoSkipInlineQuery> for InlineQuery
impl From<NoSkipInlineQuery> for InlineQuery
Source§fn from(t: NoSkipInlineQuery) -> Self
fn from(t: NoSkipInlineQuery) -> Self
Source§impl Hash for InlineQuery
impl Hash for InlineQuery
Source§impl Into<NoSkipInlineQuery> for InlineQuery
impl Into<NoSkipInlineQuery> for InlineQuery
Source§fn into(self) -> NoSkipInlineQuery
fn into(self) -> NoSkipInlineQuery
Source§impl Ord for InlineQuery
impl Ord for InlineQuery
Source§fn cmp(&self, other: &InlineQuery) -> Ordering
fn cmp(&self, other: &InlineQuery) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for InlineQuery
impl PartialEq for InlineQuery
Source§impl PartialOrd for InlineQuery
impl PartialOrd for InlineQuery
Source§impl Serialize for InlineQuery
impl Serialize for InlineQuery
impl Eq for InlineQuery
impl StructuralPartialEq for InlineQuery
Auto Trait Implementations§
impl Freeze for InlineQuery
impl RefUnwindSafe for InlineQuery
impl Send for InlineQuery
impl Sync for InlineQuery
impl Unpin for InlineQuery
impl UnsafeUnpin for InlineQuery
impl UnwindSafe for InlineQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.