pub struct EventStream<'a> { /* private fields */ }Expand description
Async stream of ServerMessages from an AsyncClient.
Implementations§
Source§impl EventStream<'_>
impl EventStream<'_>
Sourcepub async fn next(&mut self) -> Option<Result<ServerMessage>>
pub async fn next(&mut self) -> Option<Result<ServerMessage>>
Get the next server message.
Sourcepub async fn collect(self) -> Result<Vec<ServerMessage>>
pub async fn collect(self) -> Result<Vec<ServerMessage>>
Collect all remaining messages.
Auto Trait Implementations§
impl<'a> Freeze for EventStream<'a>
impl<'a> !RefUnwindSafe for EventStream<'a>
impl<'a> Send for EventStream<'a>
impl<'a> Sync for EventStream<'a>
impl<'a> Unpin for EventStream<'a>
impl<'a> UnsafeUnpin for EventStream<'a>
impl<'a> !UnwindSafe for EventStream<'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