pub struct SseEvent {
pub data: Option<String>,
pub event: Option<String>,
pub id: Option<String>,
pub retry: Option<Duration>,
}Available on crate feature
client only.Expand description
A parsed SSE event received from the server.
Fields§
§data: Option<String>Multiple data: lines are joined with \n.
event: Option<String>The event type (event: field). Defaults to "message" per the SSE spec.
id: Option<String>The event ID (id: field). None if not set or explicitly cleared.
retry: Option<Duration>The retry duration (retry: field).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SseEvent
impl RefUnwindSafe for SseEvent
impl Send for SseEvent
impl Sync for SseEvent
impl Unpin for SseEvent
impl UnsafeUnpin for SseEvent
impl UnwindSafe for SseEvent
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