pub struct SseDecoder { /* private fields */ }Expand description
Incremental SSE decoder. See the module docs.
Implementations§
Source§impl SseDecoder
impl SseDecoder
Sourcepub fn next_data(&mut self) -> Result<Option<&str>>
pub fn next_data(&mut self) -> Result<Option<&str>>
The next complete event’s data payload (multi-line data joined with
\n), or None until more input arrives. Events without data
(comments, keep-alives, event:/id:-only) are skipped.
Sourcepub fn has_partial(&self) -> bool
pub fn has_partial(&self) -> bool
Unconsumed bytes remain (a truncated final event).
Trait Implementations§
Source§impl Debug for SseDecoder
impl Debug for SseDecoder
Auto Trait Implementations§
impl Freeze for SseDecoder
impl RefUnwindSafe for SseDecoder
impl Send for SseDecoder
impl Sync for SseDecoder
impl Unpin for SseDecoder
impl UnsafeUnpin for SseDecoder
impl UnwindSafe for SseDecoder
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