pub struct StreamRequestOpener { /* private fields */ }Expand description
Incremental request reader with bounded frame storage.
Implementations§
Source§impl StreamRequestOpener
impl StreamRequestOpener
Sourcepub fn feed(
&mut self,
input: &[u8],
) -> Result<(usize, Option<StreamRequestRecord>), Error>
pub fn feed( &mut self, input: &[u8], ) -> Result<(usize, Option<StreamRequestRecord>), Error>
Read at most one record from any byte cut. The returned count is the number of input bytes used. Pass the unread suffix to the next call.
§Errors
Returns a parse, order, limit, or authentication error and closes the reader.
Sourcepub fn finish_eof(self) -> Result<ResponseCapability, Error>
pub fn finish_eof(self) -> Result<ResponseCapability, Error>
Call after the host observes real outer EOF. Check END and release the response right. This method cannot observe transport EOF itself.
§Errors
Returns an error for a missing END or partial frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamRequestOpener
impl RefUnwindSafe for StreamRequestOpener
impl Send for StreamRequestOpener
impl Sync for StreamRequestOpener
impl Unpin for StreamRequestOpener
impl UnsafeUnpin for StreamRequestOpener
impl UnwindSafe for StreamRequestOpener
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