pub struct CachingBody { /* private fields */ }Expand description
A wrapper for hyper::body::Incoming that caches the contents in-flight
On each
Implementations§
Source§impl CachingBody
impl CachingBody
Sourcepub fn new(body: Incoming, tx: Sender<Bytes>) -> Self
pub fn new(body: Incoming, tx: Sender<Bytes>) -> Self
Create a CachingBody wrapping hyper::body::Incoming
On each successful poll with [Some(Ok(http_body::Frame<bytes::Bytes>))] writes to the underlying buf
When the underlying hyper::body::Incoming reaches the end of stream it is dropped and the buf is sent over a channel
Trait Implementations§
Source§impl Body for CachingBody
impl Body for CachingBody
Source§impl Debug for CachingBody
impl Debug for CachingBody
Auto Trait Implementations§
impl Freeze for CachingBody
impl RefUnwindSafe for CachingBody
impl Send for CachingBody
impl Sync for CachingBody
impl Unpin for CachingBody
impl UnwindSafe for CachingBody
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