Enum actix_web_lab::sse::Event
source · 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 comment
Trait Implementations§
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§
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