pub struct OpenCodeEvents { /* private fields */ }Expand description
SSE stream client with automatic reconnection.
Implementations§
Source§impl OpenCodeEvents
impl OpenCodeEvents
pub fn new( base_url: String, password: Option<String>, sender: UnboundedSender<SseEvent>, ) -> Self
Sourcepub fn start(&self, cancel: CancellationToken) -> JoinHandle<()>
pub fn start(&self, cancel: CancellationToken) -> JoinHandle<()>
Spawns the reconnecting SSE listener as a background tokio task.
The task runs until the CancellationToken is cancelled.
Auto Trait Implementations§
impl Freeze for OpenCodeEvents
impl RefUnwindSafe for OpenCodeEvents
impl Send for OpenCodeEvents
impl Sync for OpenCodeEvents
impl Unpin for OpenCodeEvents
impl UnsafeUnpin for OpenCodeEvents
impl UnwindSafe for OpenCodeEvents
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