pub struct Event {
pub id: Option<String>,
pub event: String,
pub data: String,
pub retry: Option<u64>,
}Expand description
One decoded text/event-stream frame.
Fields§
§id: Option<String>id: field (or the event_id carried inside a JSON payload), replayed
as Last-Event-ID when the stream reconnects.
event: Stringevent: field; defaults to message or, when absent, to the type
field inside a JSON data payload.
data: StringConcatenated data: lines, without the trailing newline.
retry: Option<u64>retry: field in milliseconds.
Implementations§
Trait Implementations§
impl Eq for Event
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.