pub enum Event {
Data(Data),
Comment(ByteString),
}Expand description
Server-sent events message containing one or more fields.
Variants§
Data(Data)
A data message with optional ID and event name.
Data messages looks like this in the response stream.
event: foo
id: 42
data: my data
data: {
data: "multiline": "data"
data: }Comment(ByteString)
A comment message.
Comments look like this in the response stream.
: my comment
: another commentTrait Implementations§
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