pub struct SSEMessage {
pub event: String,
pub data: String,
pub id: Option<String>,
}Expand description
Server-Sent Event message
Fields§
§event: StringEvent type
data: StringEvent data as JSON string
id: Option<String>Optional event ID
Implementations§
Trait Implementations§
Source§impl Clone for SSEMessage
impl Clone for SSEMessage
Source§fn clone(&self) -> SSEMessage
fn clone(&self) -> SSEMessage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SSEMessage
impl Debug for SSEMessage
Source§impl<'de> Deserialize<'de> for SSEMessage
impl<'de> Deserialize<'de> for SSEMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SSEMessage
impl RefUnwindSafe for SSEMessage
impl Send for SSEMessage
impl Sync for SSEMessage
impl Unpin for SSEMessage
impl UnwindSafe for SSEMessage
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