pub struct GatewayEventScope<'a> { /* private fields */ }Expand description
A focused read which restores every explicitly deferred frame when it ends.
Implementations§
Source§impl GatewayEventScope<'_>
impl GatewayEventScope<'_>
Sourcepub async fn next(&mut self) -> Result<Option<ServerFrame>>
pub async fn next(&mut self) -> Result<Option<ServerFrame>>
Receives the next frame from the shared ordered stream.
§Errors
Returns an error if the transport fails or returns invalid data.
Sourcepub fn reborrow(&mut self) -> &mut GatewayEvents
pub fn reborrow(&mut self) -> &mut GatewayEvents
Reborrows the underlying stream for a nested focused operation.
Trait Implementations§
Source§impl Drop for GatewayEventScope<'_>
impl Drop for GatewayEventScope<'_>
Auto Trait Implementations§
impl<'a> !Sync for GatewayEventScope<'a>
impl<'a> !UnwindSafe for GatewayEventScope<'a>
impl<'a> Freeze for GatewayEventScope<'a>
impl<'a> RefUnwindSafe for GatewayEventScope<'a>
impl<'a> Send for GatewayEventScope<'a>
impl<'a> Unpin for GatewayEventScope<'a>
impl<'a> UnsafeUnpin for GatewayEventScope<'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