Type Alias grammers_client::client::messages::MessageIter

source ·
pub type MessageIter = IterBuffer<GetHistory, Message>;

Aliased Type§

struct MessageIter { /* private fields */ }

Implementations§

source§

impl MessageIter

source

pub fn offset_id(self, offset: i32) -> Self

source

pub fn max_date(self, offset: i32) -> Self

source

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

Determines how many messages 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<Message>, InvocationError>

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

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