pub struct ResponseOpener { /* private fields */ }Expand description
A checked record reader that accepts any byte cuts.
Implementations§
Source§impl ResponseOpener
impl ResponseOpener
Sourcepub fn feed(
&mut self,
input: &[u8],
) -> Result<(usize, Option<ResponseRecord>), Error>
pub fn feed( &mut self, input: &[u8], ) -> Result<(usize, Option<ResponseRecord>), Error>
Read at most one checked record and return how many input bytes were used. Pass the unread suffix to the next call. Finite DATA stays inside the reader and returns no public record.
§Errors
Any parse, limit, order, or tag error closes this reader.
Sourcepub fn finish_eof(&mut self) -> Result<Option<Response>, Error>
pub fn finish_eof(&mut self) -> Result<Option<Response>, Error>
Call after the host observes real outer body EOF. Check END and release a finite reply, if any. This method cannot observe transport EOF itself.
§Errors
Returns an error if END is absent, the reader failed, or EOF was checked twice.
Auto Trait Implementations§
impl Freeze for ResponseOpener
impl RefUnwindSafe for ResponseOpener
impl Send for ResponseOpener
impl Sync for ResponseOpener
impl Unpin for ResponseOpener
impl UnsafeUnpin for ResponseOpener
impl UnwindSafe for ResponseOpener
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