pub struct AsyncRequestBody<'a>(/* private fields */);
Expand description
异步 HTTP 请求体
Implementations§
Source§impl<'a> AsyncRequestBody<'a>
impl<'a> AsyncRequestBody<'a>
Sourcepub fn from_referenced_reader<T: AsyncRead + AsyncReset + Unpin + Debug + Send + Sync + 'a>(
reader: &'a mut T,
size: u64,
) -> Self
pub fn from_referenced_reader<T: AsyncRead + AsyncReset + Unpin + Debug + Send + Sync + 'a>( reader: &'a mut T, size: u64, ) -> Self
通过异步输入流的可变引用创建异步 HTTP 请求体
Sourcepub fn from_referenced_bytes(bytes: &'a [u8]) -> Self
pub fn from_referenced_bytes(bytes: &'a [u8]) -> Self
通过二进制数据的引用创建异步 HTTP 请求体
Sourcepub fn from_reader(
reader: impl AsyncRead + AsyncReset + Unpin + Debug + Send + Sync + 'static,
size: u64,
) -> Self
pub fn from_reader( reader: impl AsyncRead + AsyncReset + Unpin + Debug + Send + Sync + 'static, size: u64, ) -> Self
通过异步输入流创建异步 HTTP 请求体
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_bytes(bytes: Vec<u8>) -> Self
通过二进制数据创建异步 HTTP 请求体
Trait Implementations§
Source§impl AsyncRead for AsyncRequestBody<'_>
impl AsyncRead for AsyncRequestBody<'_>
Source§impl AsyncReset for AsyncRequestBody<'_>
impl AsyncReset for AsyncRequestBody<'_>
Source§impl<'a> Debug for AsyncRequestBody<'a>
impl<'a> Debug for AsyncRequestBody<'a>
Source§impl Default for AsyncRequestBody<'_>
impl Default for AsyncRequestBody<'_>
Source§impl<'a> From<&'a [u8]> for AsyncRequestBody<'a>
impl<'a> From<&'a [u8]> for AsyncRequestBody<'a>
Source§impl<'a> From<&'a mut AsyncRequestBody<'_>> for AsyncRequestBody<'a>
impl<'a> From<&'a mut AsyncRequestBody<'_>> for AsyncRequestBody<'a>
Source§fn from(body: &'a mut AsyncRequestBody<'_>) -> Self
fn from(body: &'a mut AsyncRequestBody<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for AsyncRequestBody<'a>
impl<'a> From<&'a str> for AsyncRequestBody<'a>
Source§impl From<String> for AsyncRequestBody<'_>
impl From<String> for AsyncRequestBody<'_>
Auto Trait Implementations§
impl<'a> Freeze for AsyncRequestBody<'a>
impl<'a> !RefUnwindSafe for AsyncRequestBody<'a>
impl<'a> Send for AsyncRequestBody<'a>
impl<'a> Sync for AsyncRequestBody<'a>
impl<'a> Unpin for AsyncRequestBody<'a>
impl<'a> !UnwindSafe for AsyncRequestBody<'a>
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>where
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>where
Self: Unpin,
Reads some bytes from the byte stream. Read more
Source§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self>where
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self>where
Self: Unpin,
Source§fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self>where
Self: Unpin,
fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self>where
Self: Unpin,
Source§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self>where
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self>where
Self: Unpin,
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self>where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self>where
Self: Unpin,
Reads the exact number of bytes required to fill
buf
. Read moreSource§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
Creates an adapter which will read at most
limit
bytes from it. Read moreSource§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