pub struct EventStreamHandler { /* private fields */ }Expand description
An owned permission to stop an EventStream and terminate its backing RunLoop.
A EventStreamHandler detaches the associated Stream and RunLoop when it is dropped, which
means that there is no longer any handle to them and no way to abort them.
Dropping the handler without first calling abort is not
recommended because this leaves a spawned thread behind and causes memory leaks.
Implementations§
Source§impl EventStreamHandler
impl EventStreamHandler
Sourcepub fn abort(&mut self)
pub fn abort(&mut self)
Stop an EventStream and terminate its backing RunLoop.
Calling this method multiple times has no extra effect and won’t cause any panic, error, or undefined behavior.
Trait Implementations§
impl Send for EventStreamHandler
Auto Trait Implementations§
impl Freeze for EventStreamHandler
impl !RefUnwindSafe for EventStreamHandler
impl Sync for EventStreamHandler
impl Unpin for EventStreamHandler
impl !UnwindSafe for EventStreamHandler
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