pub enum SseChunk<T> {
Data(T),
Done,
}Expand description
Either a decoded JSON value from one SSE data payload or an explicit end marker.
Variants§
Data(T)
Successfully deserialized JSON object.
Done
Synthetic item emitted when DoneMarkerPolicy
matches (then stream ends).
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for SseChunk<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for SseChunk<T>where
T: DeserializeOwned,
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
impl<T> StructuralPartialEq for SseChunk<T>
Auto Trait Implementations§
impl<T> Freeze for SseChunk<T>where
T: Freeze,
impl<T> RefUnwindSafe for SseChunk<T>where
T: RefUnwindSafe,
impl<T> Send for SseChunk<T>where
T: Send,
impl<T> Sync for SseChunk<T>where
T: Sync,
impl<T> Unpin for SseChunk<T>where
T: Unpin,
impl<T> UnsafeUnpin for SseChunk<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SseChunk<T>where
T: UnwindSafe,
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.