pub struct SseFrame {
pub event: Option<String>,
pub data: String,
pub id: Option<String>,
}Expand description
A single frame to be sent over the SSE connection.
Fields§
§event: Option<String>Optional event type (the event: field in SSE).
data: StringThe data: field in SSE (JSON-encoded string, typically).
id: Option<String>Optional event ID (the id: field in SSE). Used for reconnection.
Auto Trait Implementations§
impl Freeze for SseFrame
impl RefUnwindSafe for SseFrame
impl Send for SseFrame
impl Sync for SseFrame
impl Unpin for SseFrame
impl UnsafeUnpin for SseFrame
impl UnwindSafe for SseFrame
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