pub enum Event {
Notification(ServerNotification),
Request(PendingServerRequest),
Closed,
}Expand description
An event pushed from the app-server connection. Deliberately not
#[non_exhaustive] (contrast Error, which explains its own opposite
choice) - this models a closed, stable three-way split of “shape of thing
the app-server can send,” not an open-ended taxonomy, so callers matching
on it exhaustively (as this crate’s own code does everywhere) get a
compile error if a variant is ever added, rather than silently ignoring
the new case via a wildcard arm.
Variants§
Notification(ServerNotification)
A fire-and-forget server notification (turn/completed, item/started, etc.).
Request(PendingServerRequest)
A request the app-server expects a reply to (approvals, elicitation, etc.).
Closed
The transport closed (EOF or the child process exited). No further
events will be produced; the EventStream is exhausted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl !UnwindSafe for Event
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