pub enum Event {
Message {
id: Option<String>,
event: String,
data: String,
},
Retry {
retry: u64,
},
}
Expand description
An “event”, either an incoming message or some meta-action that needs to be applied to the stream.
Variants§
Message
An incoming message.
Fields
§
id: Option<String>
The ID of this event.
See also the Server-Sent Events spec.
Retry
Set the reconnection time.
See also the Server-Sent Events spec.
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 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