pub struct GatewayEvents { /* private fields */ }Expand description
Single-owner framed event reader.
Implementations§
Source§impl GatewayEvents
impl GatewayEvents
Sourcepub async fn next(&mut self) -> Result<Option<ServerFrame>>
pub async fn next(&mut self) -> Result<Option<ServerFrame>>
Receives the next version-checked server frame.
§Errors
Returns an error if the transport fails or returns invalid data.
Sourcepub fn scoped(&mut self) -> GatewayEventScope<'_>
pub fn scoped(&mut self) -> GatewayEventScope<'_>
Starts a focused response wait without consuming unrelated gateway events.
Auto Trait Implementations§
impl !Sync for GatewayEvents
impl Freeze for GatewayEvents
impl RefUnwindSafe for GatewayEvents
impl Send for GatewayEvents
impl Unpin for GatewayEvents
impl UnsafeUnpin for GatewayEvents
impl UnwindSafe for GatewayEvents
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