pub struct SseEventIterator<'a> { /* private fields */ }Expand description
Iterator over SSE events in a text stream.
Implementations§
Source§impl<'a> SseEventIterator<'a>
impl<'a> SseEventIterator<'a>
Sourcepub fn skip_incomplete_event(&mut self) -> usize
pub fn skip_incomplete_event(&mut self) -> usize
Skip past an incomplete event at current position. Returns the new position, or text.len() if already at end.
Sourcepub fn next_event(&mut self) -> Option<Result<SseEvent, SseParseError>>
pub fn next_event(&mut self) -> Option<Result<SseEvent, SseParseError>>
Parse the next SSE event from the text. Returns None if no more events, or Some(Err) on parse error.
Auto Trait Implementations§
impl<'a> Freeze for SseEventIterator<'a>
impl<'a> RefUnwindSafe for SseEventIterator<'a>
impl<'a> Send for SseEventIterator<'a>
impl<'a> Sync for SseEventIterator<'a>
impl<'a> Unpin for SseEventIterator<'a>
impl<'a> UnsafeUnpin for SseEventIterator<'a>
impl<'a> UnwindSafe for SseEventIterator<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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