pub struct EventStreamDecoder { /* private fields */ }Available on crate feature
aws only.Expand description
Incremental binary frame decoder.
Implementations§
Source§impl EventStreamDecoder
impl EventStreamDecoder
Sourcepub fn next_frame(
&mut self,
) -> Result<Option<EventStreamFrame>, EventStreamParseError>
pub fn next_frame( &mut self, ) -> Result<Option<EventStreamFrame>, EventStreamParseError>
Try to parse the next complete frame. Returns Ok(None) when
the buffer does not yet contain a full frame, Ok(Some(_)) on
success, or Err(_) when the next frame’s prelude is
malformed (in which case the decoder’s state is corrupted —
callers should treat the stream as failed).
Sourcepub fn has_residual(&self) -> bool
pub fn has_residual(&self) -> bool
True when the internal buffer has bytes that have not yet completed a frame.
Trait Implementations§
Source§impl Default for EventStreamDecoder
impl Default for EventStreamDecoder
Source§fn default() -> EventStreamDecoder
fn default() -> EventStreamDecoder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventStreamDecoder
impl RefUnwindSafe for EventStreamDecoder
impl Send for EventStreamDecoder
impl Sync for EventStreamDecoder
impl Unpin for EventStreamDecoder
impl UnsafeUnpin for EventStreamDecoder
impl UnwindSafe for EventStreamDecoder
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.