pub struct Event {
pub id: Option<String>,
pub event: Option<String>,
pub data: String,
pub retry: Option<Duration>,
}Expand description
One event.
Fields§
§id: Option<String>Sent as id:. The browser remembers the last one and presents it as
Last-Event-ID when it reconnects.
event: Option<String>Sent as event:. EventSource dispatches it by this name; without
one it is a plain message.
data: String§retry: Option<Duration>Sent as retry:, in milliseconds — how long the browser waits before
reconnecting after this connection ends.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Event
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