pub enum Data<E> {
Bytes(Bytes),
Stream(Pin<Box<dyn Stream<Item = Result<Bytes, E>> + Sync + Send>>, usize),
}Expand description
Payload for http request
Variants§
Bytes(Bytes)
Transferring Payload in a Single Chunk
Stream(Pin<Box<dyn Stream<Item = Result<Bytes, E>> + Sync + Send>>, usize)
Transferring Payload in Multiple Chunks, usize the total byte length of the stream.
Implementations§
Trait Implementations§
Source§impl<E> From<(Pin<Box<dyn Stream<Item = Result<Bytes, E>> + Sync + Send>>, usize)> for Data<E>
impl<E> From<(Pin<Box<dyn Stream<Item = Result<Bytes, E>> + Sync + Send>>, usize)> for Data<E>
Auto Trait Implementations§
impl<E> !Freeze for Data<E>
impl<E> !RefUnwindSafe for Data<E>
impl<E> Send for Data<E>
impl<E> Sync for Data<E>
impl<E> Unpin for Data<E>
impl<E> !UnwindSafe for Data<E>
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