pub struct SseEvent {
pub event: Option<String>,
pub data: String,
pub id: Option<String>,
pub retry: Option<u64>,
}Expand description
Represents a single Server-Sent Event (SSE).
Fields§
§event: Option<String>The event type (e.g., “message”).
data: StringThe event payload.
id: Option<String>An optional event ID.
retry: Option<u64>The retry time in milliseconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SseEvent
impl<'de> Deserialize<'de> for SseEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SseEvent
impl StructuralPartialEq for SseEvent
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