Skip to main content

InlineResultIter

Type Alias InlineResultIter 

Source
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

Source

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.

Source

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.