pub struct ConnectionStateStream<'a> { /* private fields */ }Available on crate feature
async only.Expand description
Async stream of ConnectionStateEvent for a crate::client::TcpClient.
Implementations§
Source§impl<'a> ConnectionStateStream<'a>
impl<'a> ConnectionStateStream<'a>
Sourcepub fn subscribe(client: &'a TcpClient, capacity: usize) -> Self
pub fn subscribe(client: &'a TcpClient, capacity: usize) -> Self
Subscribe to connection state changes.
Sourcepub const fn next(&self) -> NextItem<'_, ConnectionStateEvent>
pub const fn next(&self) -> NextItem<'_, ConnectionStateEvent>
Asynchronously wait for the next event.
Sourcepub fn try_next(&self) -> Option<ConnectionStateEvent>
pub fn try_next(&self) -> Option<ConnectionStateEvent>
Try to get an event without blocking.
Sourcepub fn buffered_count(&self) -> usize
pub fn buffered_count(&self) -> usize
Number of events currently buffered.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ConnectionStateStream<'a>
impl<'a> !UnwindSafe for ConnectionStateStream<'a>
impl<'a> Freeze for ConnectionStateStream<'a>
impl<'a> Send for ConnectionStateStream<'a>
impl<'a> Sync for ConnectionStateStream<'a>
impl<'a> Unpin for ConnectionStateStream<'a>
impl<'a> UnsafeUnpin for ConnectionStateStream<'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