Struct carapax::types::AnswerInlineQuery
source · pub struct AnswerInlineQuery { /* private fields */ }
Expand description
Sends an answer to an inline query.
No more than 50 results per query are allowed.
Implementations§
source§impl AnswerInlineQuery
impl AnswerInlineQuery
sourcepub fn new<A, B>(inline_query_id: A, results: B) -> AnswerInlineQuery
pub fn new<A, B>(inline_query_id: A, results: B) -> AnswerInlineQuery
Creates a new AnswerInlineQuery
.
§Arguments
inline_query_id
- Unique identifier of the answered query.results
- An array of results.
Sets a new button.
§Arguments
value
- An object describing a button to be shown above inline query results.
sourcepub fn with_cache_time(self, value: i64) -> AnswerInlineQuery
pub fn with_cache_time(self, value: i64) -> AnswerInlineQuery
Sets a new cache time.
§Arguments
value
- Maximum amount of time in seconds that the result of the inline query may be cached on the server; default - 300.
sourcepub fn with_is_personal(self, value: bool) -> AnswerInlineQuery
pub fn with_is_personal(self, value: bool) -> AnswerInlineQuery
Sets a new value for an is_personal
flag.
§Arguments
value
- Indicates whether the cache results on the server side are only for the user that sent the query; by default, results may be returned to any user who sends the same query.
sourcepub fn with_next_offset<T>(self, value: T) -> AnswerInlineQuery
pub fn with_next_offset<T>(self, value: T) -> AnswerInlineQuery
Sets a new next offset.
§Arguments
value
- Offset that a client should send in the next query with the same text to receive more results.
Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes.
Trait Implementations§
source§impl Clone for AnswerInlineQuery
impl Clone for AnswerInlineQuery
source§fn clone(&self) -> AnswerInlineQuery
fn clone(&self) -> AnswerInlineQuery
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnswerInlineQuery
impl Debug for AnswerInlineQuery
source§impl Method for AnswerInlineQuery
impl Method for AnswerInlineQuery
source§impl Serialize for AnswerInlineQuery
impl Serialize for AnswerInlineQuery
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AnswerInlineQuery
impl RefUnwindSafe for AnswerInlineQuery
impl Send for AnswerInlineQuery
impl Sync for AnswerInlineQuery
impl Unpin for AnswerInlineQuery
impl UnwindSafe for AnswerInlineQuery
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
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more