pub struct SseFormatter;Expand description
Encodes events as text/event-stream frames.
Each event becomes a single data: block holding its JSON, exactly as the
TypeScript SDK writes it:
data: {"type":"TEXT_MESSAGE_END","messageId":"msg-1"}
Implementations§
Source§impl SseFormatter
impl SseFormatter
Trait Implementations§
Source§impl Clone for SseFormatter
impl Clone for SseFormatter
Source§fn clone(&self) -> SseFormatter
fn clone(&self) -> SseFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SseFormatter
Source§impl Debug for SseFormatter
impl Debug for SseFormatter
Source§impl Default for SseFormatter
impl Default for SseFormatter
Source§fn default() -> SseFormatter
fn default() -> SseFormatter
Returns the “default value” for a type. Read more
impl Eq for SseFormatter
Source§impl EventStreamFormatter for SseFormatter
impl EventStreamFormatter for SseFormatter
Source§impl PartialEq for SseFormatter
impl PartialEq for SseFormatter
Source§fn eq(&self, other: &SseFormatter) -> bool
fn eq(&self, other: &SseFormatter) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SseFormatter
Auto Trait Implementations§
impl Freeze for SseFormatter
impl RefUnwindSafe for SseFormatter
impl Send for SseFormatter
impl Sync for SseFormatter
impl Unpin for SseFormatter
impl UnsafeUnpin for SseFormatter
impl UnwindSafe for SseFormatter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.