pub struct StreamingDecoder { /* private fields */ }Expand description
Streaming decoder for receiving chunked transmissions
Implementations§
Source§impl StreamingDecoder
impl StreamingDecoder
Sourcepub fn with_config(config: StreamingConfig) -> Self
pub fn with_config(config: StreamingConfig) -> Self
Creates a new StreamingDecoder with custom configuration
Sourcepub fn feed_frame(
&mut self,
frame_bytes: &[u8],
) -> Result<StreamingEvent, StreamingError>
pub fn feed_frame( &mut self, frame_bytes: &[u8], ) -> Result<StreamingEvent, StreamingError>
Processes an incoming frame
Sourcepub fn get_complete_payload(&self) -> Option<&[u8]>
pub fn get_complete_payload(&self) -> Option<&[u8]>
Returns the complete payload if stream is complete
Sourcepub fn state(&self) -> &StreamingState
pub fn state(&self) -> &StreamingState
Returns the current streaming state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingDecoder
impl RefUnwindSafe for StreamingDecoder
impl Send for StreamingDecoder
impl Sync for StreamingDecoder
impl Unpin for StreamingDecoder
impl UnwindSafe for StreamingDecoder
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