pub struct LiveReceiver { /* private fields */ }Expand description
Receiving half of a split Live session.
Implementations§
Source§impl LiveReceiver
impl LiveReceiver
Sourcepub async fn recv(&mut self) -> Result<Option<ServerEvent>>
pub async fn recv(&mut self) -> Result<Option<ServerEvent>>
Receives the next typed server event.
Returns None after a WebSocket Close frame or end of stream. Ping
frames are answered with Pong and are not surfaced to the caller.
Sourcepub async fn close(self) -> Result<Option<SessionClosedEvent>>
pub async fn close(self) -> Result<Option<SessionClosedEvent>>
Gracefully closes the Live session and then the WebSocket.
Auto Trait Implementations§
impl !RefUnwindSafe for LiveReceiver
impl !UnwindSafe for LiveReceiver
impl Freeze for LiveReceiver
impl Send for LiveReceiver
impl Sync for LiveReceiver
impl Unpin for LiveReceiver
impl UnsafeUnpin for LiveReceiver
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