pub struct NativeReader { /* private fields */ }Expand description
Reads only until another framed event is available. Dropping next while
awaiting another body chunk retains decoder state and the current chunk.
A decoder/transport error poisons this reader and releases its transport;
transport is never replayed. Large/empty ready input cooperatively yields
so cancellation and host deadlines remain observable.
Implementations§
Source§impl NativeReader
impl NativeReader
pub fn new(body: HttpBody, framing: SourceFraming, limits: CodecLimits) -> Self
pub async fn next<T: DeserializeOwned + DeclaredFields>( &mut self, ) -> Result<Option<NativeFrame<T>>, CodecError>
Auto Trait Implementations§
impl !Freeze for NativeReader
impl !RefUnwindSafe for NativeReader
impl !Sync for NativeReader
impl !UnwindSafe for NativeReader
impl Send for NativeReader
impl Unpin for NativeReader
impl UnsafeUnpin for NativeReader
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