Type Alias grammers_client::client::dialogs::DialogIter

source ·
pub type DialogIter = IterBuffer<GetDialogs, Dialog>;

Aliased Type§

struct DialogIter { /* private fields */ }

Implementations§

source§

impl DialogIter

source

pub async fn total(&mut self) -> Result<usize, InvocationError>

Determines how many dialogs there are in total.

This only performs a network call if next has not been called before.

source

pub async fn next(&mut self) -> Result<Option<Dialog>, InvocationError>

Return the next Dialog from the internal buffer, filling the buffer previously if it’s empty.

Returns None if the limit is reached or there are no dialogs left.