pub type InlineResultIter = IterBuffer<GetInlineBotResults, InlineResult>;Expand description
Iterator returned by Client::inline_query.
Aliased Type§
pub struct InlineResultIter { /* private fields */ }Implementations§
Source§impl InlineResultIter
impl InlineResultIter
Sourcepub fn peer<C: Into<PeerRef>>(self, peer: C) -> Self
pub fn peer<C: Into<PeerRef>>(self, peer: C) -> Self
Indicate the bot the peer where this inline query will be sent to.
Some bots use this information to return different results depending on the type of the peer, and some even “need” it to give useful results.
Sourcepub async fn next(&mut self) -> Result<Option<InlineResult>, InvocationError>
pub async fn next(&mut self) -> Result<Option<InlineResult>, InvocationError>
Return the next InlineResult from the internal buffer, filling the buffer previously if
it’s empty.
Returns None if the limit is reached or there are no results left.