pub struct ChannelPresence<'a> { /* private fields */ }Expand description
Current Presence state and changes for a joined channel.
The value borrows its Channel so a resynchronization can leave and
rejoin the same channel with a freshly loaded join payload.
Implementations§
Source§impl<'a> ChannelPresence<'a>
impl<'a> ChannelPresence<'a>
Sourcepub fn requires_resync(&self) -> bool
pub fn requires_resync(&self) -> bool
Returns whether event lag invalidated local state.
Sourcepub async fn resync(&mut self) -> Result<(), ClientError>
pub async fn resync(&mut self) -> Result<(), ClientError>
Clears local state, leaves, and rejoins to request a fresh full state.
Sourcepub async fn next(
&mut self,
) -> Option<Result<PresenceEvent, PresenceStreamError>>
pub async fn next( &mut self, ) -> Option<Result<PresenceEvent, PresenceStreamError>>
Returns the next Presence change or lifecycle event.
Auto Trait Implementations§
impl<'a> Freeze for ChannelPresence<'a>
impl<'a> !RefUnwindSafe for ChannelPresence<'a>
impl<'a> !Send for ChannelPresence<'a>
impl<'a> !Sync for ChannelPresence<'a>
impl<'a> Unpin for ChannelPresence<'a>
impl<'a> UnsafeUnpin for ChannelPresence<'a>
impl<'a> !UnwindSafe for ChannelPresence<'a>
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