Available on crate feature
sse
only.Expand description
An “event”, either an incoming message or some meta-action that needs to be applied to the stream.
Variants
Message
Fields
id: String
The ID of this event.
See also the Server-Sent Events spec.
event: String
The event type. Defaults to “message” if no event name is provided.
data: String
The data for this event.
An incoming message.
Retry
Fields
retry: u64
The new reconnection time in milliseconds.
Set the reconnection time.
See also the Server-Sent Events spec.
Implementations
sourceimpl Event
impl Event
Trait Implementations
impl Eq for Event
impl StructuralEq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.