pub struct EventStream { /* private fields */ }Expand description
A structure representing the event stream received via a websocket connection.
This stream continuously processes events from the ComfyUI service.
Methods from Deref<Target = ReceiverStream<ClientResult<Event>>>§
Sourcepub fn close(&mut self)
pub fn close(&mut self)
Closes the receiving half of a channel without dropping it.
This prevents any further messages from being sent on the channel while
still enabling the receiver to drain messages that are buffered. Any
outstanding Permit values will still be able to send messages.
To guarantee no messages are dropped, after calling close(), you must
receive all items from the stream until None is returned.
Trait Implementations§
Source§impl Deref for EventStream
impl Deref for EventStream
Source§fn deref(&self) -> &Self::Target
fn deref(&self) -> &Self::Target
Allows access to the inner ReceiverStream containing the events.
Source§type Target = ReceiverStream<Result<Event, ClientError>>
type Target = ReceiverStream<Result<Event, ClientError>>
The resulting type after dereferencing.
Source§impl DerefMut for EventStream
impl DerefMut for EventStream
Source§fn deref_mut(&mut self) -> &mut Self::Target
fn deref_mut(&mut self) -> &mut Self::Target
Allows mutable access to the inner ReceiverStream.
Source§impl Drop for EventStream
impl Drop for EventStream
Source§fn drop(&mut self)
fn drop(&mut self)
When the EventStream is dropped, abort the associated websocket
handling task.
Auto Trait Implementations§
impl Freeze for EventStream
impl RefUnwindSafe for EventStream
impl Send for EventStream
impl Sync for EventStream
impl Unpin for EventStream
impl UnwindSafe for EventStream
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