pub struct MessageIter { /* private fields */ }Expand description
Cursor-based iterator over message history. Created by Client::iter_messages.
Implementations§
Source§impl MessageIter
impl MessageIter
Sourcepub async fn next(
&mut self,
client: &Client,
) -> Result<Option<IncomingMessage>, InvocationError>
pub async fn next( &mut self, client: &Client, ) -> Result<Option<IncomingMessage>, InvocationError>
Fetch the next message (newest first). Returns None when all messages have been yielded.
Auto Trait Implementations§
impl Freeze for MessageIter
impl RefUnwindSafe for MessageIter
impl Send for MessageIter
impl Sync for MessageIter
impl Unpin for MessageIter
impl UnsafeUnpin for MessageIter
impl UnwindSafe for MessageIter
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> 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