Struct EventReceiver
pub struct EventReceiver { /* private fields */ }Expand description
Blocking event-only subscriber for application worker threads. The handshake is bounded and acknowledged; no subprocess or second daemon is required. EOF/error is a discontinuity: callers must clear held state before reconnect.
Implementations§
§impl EventReceiver
impl EventReceiver
pub fn connect(addr: &str, token: &str) -> Result<EventReceiver, AppError>
pub fn next_event(&mut self) -> Result<Option<SemanticEvent>, AppError>
pub fn cancellation_handle(&self) -> Result<TcpStream, AppError>
pub fn cancellation_handle(&self) -> Result<TcpStream, AppError>
Clone only for cancellation from an owning thread; shutting this handle down wakes a worker blocked in next_event().
pub fn close(&self)
Auto Trait Implementations§
impl Freeze for EventReceiver
impl RefUnwindSafe for EventReceiver
impl Send for EventReceiver
impl Sync for EventReceiver
impl Unpin for EventReceiver
impl UnsafeUnpin for EventReceiver
impl UnwindSafe for EventReceiver
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