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
Set the id of the message. If the event is not a message type, there will be no effect.
Set the event type of the message. If the event is not a message type, there will be no effect.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more