pub struct SseTransformer { /* private fields */ }Implementations§
Source§impl SseTransformer
impl SseTransformer
pub fn new( pair: TransformPair, ctx: TransformContext, ) -> Result<Self, TransformError>
pub fn with_options( pair: TransformPair, ctx: TransformContext, options: StreamOptions, ) -> Result<Self, TransformError>
Sourcepub fn push(&mut self, chunk: &[u8]) -> Result<Vec<u8>, TransformError>
pub fn push(&mut self, chunk: &[u8]) -> Result<Vec<u8>, TransformError>
Feed one upstream chunk; returns encoded inbound bytes (possibly empty).
Sourcepub fn push_detailed(
&mut self,
chunk: &[u8],
) -> Result<TransformOutput<Vec<u8>>, TransformError>
pub fn push_detailed( &mut self, chunk: &[u8], ) -> Result<TransformOutput<Vec<u8>>, TransformError>
Feed one chunk and return semantic diagnostics produced by its events.
Sourcepub fn finish(&mut self) -> Result<Vec<u8>, TransformError>
pub fn finish(&mut self) -> Result<Vec<u8>, TransformError>
Flush the trailing frame and emit the inbound terminator.
Sourcepub fn finish_detailed(
&mut self,
) -> Result<TransformOutput<Vec<u8>>, TransformError>
pub fn finish_detailed( &mut self, ) -> Result<TransformOutput<Vec<u8>>, TransformError>
Flush the stream and return final semantic diagnostics.
pub fn diagnostics(&self) -> StreamDiagnostics
Auto Trait Implementations§
impl Freeze for SseTransformer
impl RefUnwindSafe for SseTransformer
impl Send for SseTransformer
impl Sync for SseTransformer
impl Unpin for SseTransformer
impl UnsafeUnpin for SseTransformer
impl UnwindSafe for SseTransformer
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