Enum grammers_client::client::chats::ParticipantIter
source · pub enum ParticipantIter {
Empty,
Chat {
client: Client,
chat_id: i64,
buffer: VecDeque<Participant>,
total: Option<usize>,
},
Channel(IterBuffer<GetParticipants, Participant>),
}
Variants§
Implementations§
source§impl ParticipantIter
impl ParticipantIter
sourcepub async fn total(&mut self) -> Result<usize, InvocationError>
pub async fn total(&mut self) -> Result<usize, InvocationError>
Determines how many participants there are in total.
This only performs a network call if next
has not been called before.
sourcepub async fn next(&mut self) -> Result<Option<Participant>, InvocationError>
pub async fn next(&mut self) -> Result<Option<Participant>, InvocationError>
Return the next Participant
from the internal buffer, filling the buffer previously if
it’s empty.
Returns None
if the limit
is reached or there are no participants left.
sourcepub fn filter(self, filter: ChannelParticipantsFilter) -> Self
pub fn filter(self, filter: ChannelParticipantsFilter) -> Self
apply a filter on fetched participants, note that this filter will apply only on large Channel
and not small groups
Auto Trait Implementations§
impl Freeze for ParticipantIter
impl !RefUnwindSafe for ParticipantIter
impl Send for ParticipantIter
impl Sync for ParticipantIter
impl Unpin for ParticipantIter
impl !UnwindSafe for ParticipantIter
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