pub struct SseFrameParser { /* private fields */ }Expand description
I/O-free Server-Sent Events frame parser.
Implementations§
Source§impl SseFrameParser
impl SseFrameParser
Sourcepub fn last_event_id(&self) -> Option<&str>
pub fn last_event_id(&self) -> Option<&str>
Last-event-id seen so far; persists across dispatched frames so a
reconnecting caller can resume via the Last-Event-ID header.
Trait Implementations§
Source§impl Debug for SseFrameParser
impl Debug for SseFrameParser
Source§impl Default for SseFrameParser
impl Default for SseFrameParser
Source§fn default() -> SseFrameParser
fn default() -> SseFrameParser
Returns the “default value” for a type. Read more
Source§impl HttpCoroutine for SseFrameParser
impl HttpCoroutine for SseFrameParser
type Yield = SseFrameParserYield
type Return = Infallible
Source§fn resume(
&mut self,
arg: Option<&[u8]>,
) -> HttpCoroutineState<Self::Yield, Self::Return>
fn resume( &mut self, arg: Option<&[u8]>, ) -> HttpCoroutineState<Self::Yield, Self::Return>
Advances one step. Pass
None initially or after HttpYield::WantsWrite;
pass Some(data) after HttpYield::WantsRead; pass Some(&[]) for EOF.Auto Trait Implementations§
impl Freeze for SseFrameParser
impl RefUnwindSafe for SseFrameParser
impl Send for SseFrameParser
impl Sync for SseFrameParser
impl Unpin for SseFrameParser
impl UnsafeUnpin for SseFrameParser
impl UnwindSafe for SseFrameParser
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