Struct qiniu_http::AsyncRequestBody
source · [−]pub struct AsyncRequestBody<'a>(_);
Available on crate feature
async
only.Expand description
异步 HTTP 请求体
Implementations
sourceimpl<'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
sourceimpl AsyncRead for AsyncRequestBody<'_>
impl AsyncRead for AsyncRequestBody<'_>
sourceimpl AsyncReset for AsyncRequestBody<'_>
impl AsyncReset for AsyncRequestBody<'_>
sourceimpl<'a> Debug for AsyncRequestBody<'a>
impl<'a> Debug for AsyncRequestBody<'a>
sourceimpl Default for AsyncRequestBody<'_>
impl Default for AsyncRequestBody<'_>
sourceimpl<'a> From<&'a mut AsyncRequestBody<'_>> for AsyncRequestBody<'a>
impl<'a> From<&'a mut AsyncRequestBody<'_>> for AsyncRequestBody<'a>
sourcefn from(body: &'a mut AsyncRequestBody<'_>) -> Self
fn from(body: &'a mut AsyncRequestBody<'_>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a str> for AsyncRequestBody<'a>
impl<'a> From<&'a str> for AsyncRequestBody<'a>
sourceimpl From<String> for AsyncRequestBody<'_>
impl From<String> for AsyncRequestBody<'_>
Auto Trait Implementations
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
sourceimpl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
sourcefn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin,
fn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin,
Reads some bytes from the byte stream. Read more
sourcefn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
sourcefn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
sourcefn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
sourcefn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
Reads the exact number of bytes required to fill buf
. Read more
sourcefn take(self, limit: u64) -> Take<Self>
fn take(self, limit: u64) -> Take<Self>
Creates an adapter which will read at most limit
bytes from it. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more