#[non_exhaustive]pub enum SseFrame<E = Event> {
Event(E),
Comment(String),
}Expand description
A data event or an SSE transport comment.
Comments are independent of the AG-UI event lifecycle. They can carry replay boundaries without manufacturing a protocol event. Each line is escaped as a comment by the SDK, so input cannot inject a data frame.
#[non_exhaustive]: text/event-stream has fields this enum does not
write yet, such as id and retry, and a frame for one can be added
without a breaking release.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Event(E)
One serializable value. Standard live producers use Event and its
metadata field. Other representations are a host compatibility choice,
not an extension of the protocol schema.
Comment(String)
A comment ignored by standard SSE event consumers.
Trait Implementations§
impl<E: PartialEq> StructuralPartialEq for SseFrame<E>
Auto Trait Implementations§
impl<E> Freeze for SseFrame<E>where
E: Freeze,
impl<E> RefUnwindSafe for SseFrame<E>where
E: RefUnwindSafe,
impl<E> Send for SseFrame<E>where
E: Send,
impl<E> Sync for SseFrame<E>where
E: Sync,
impl<E> Unpin for SseFrame<E>where
E: Unpin,
impl<E> UnsafeUnpin for SseFrame<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for SseFrame<E>where
E: UnwindSafe,
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