Struct eventsource::event::Event [] [src]

pub struct Event {
    pub id: Option<String>,
    pub event_type: Option<String>,
    pub data: String,
}

A single Server-Sent Event.

Fields

Corresponds to the id field.

Corresponds to the event field.

All data fields concatenated by newlines.

Methods

impl Event
[src]

Creates an empty event.

Returns true if the event is empty.

An event is empty if it has no id or event type and its data field is empty.

Makes the event empty.

Trait Implementations

impl Debug for Event
[src]

Formats the value using the given formatter.

impl Display for Event
[src]

Formats the value using the given formatter. Read more