pub struct Pending { /* private fields */ }test-util only.Expand description
Implementations§
Source§impl Pending
impl Pending
Sourcepub fn builder() -> PendingBuilder
pub fn builder() -> PendingBuilder
Starts building a new PendingStream.
Sourcepub async fn read_at_most_into(
&mut self,
_len: usize,
_into: BytesBuf,
) -> Result<(usize, BytesBuf), Infallible>
pub async fn read_at_most_into( &mut self, _len: usize, _into: BytesBuf, ) -> Result<(usize, BytesBuf), Infallible>
Starts a read operation that never completes.
§Errors
This call never fails (because it never completes).
Sourcepub async fn read_more_into(
&mut self,
_into: BytesBuf,
) -> Result<(usize, BytesBuf), Infallible>
pub async fn read_more_into( &mut self, _into: BytesBuf, ) -> Result<(usize, BytesBuf), Infallible>
Starts a read operation that never completes.
§Errors
This call never fails (because it never completes).
Sourcepub async fn read_any(&mut self) -> Result<BytesBuf, Infallible>
pub async fn read_any(&mut self) -> Result<BytesBuf, Infallible>
Starts a read operation that never completes.
§Errors
This call never fails (because it never completes).
Sourcepub async fn write(&mut self, _sequence: BytesView) -> Result<(), Infallible>
pub async fn write(&mut self, _sequence: BytesView) -> Result<(), Infallible>
Starts a write operation that never completes.
§Errors
This call never fails (because it never completes).
Sourcepub fn memory(&self) -> impl MemoryShared
pub fn memory(&self) -> impl MemoryShared
Returns the memory provider that was configured in the builder.
Sourcepub fn reserve(&self, min_bytes: usize) -> BytesBuf
pub fn reserve(&self, min_bytes: usize) -> BytesBuf
Reserves at least min_bytes bytes of memory capacity.
Returns an empty BytesBuf that can be used to fill the reserved memory with data.
The memory provider may provide more memory than requested.
The memory reservation request will always be fulfilled, obtaining more memory from the operating system if necessary.
§Zero-sized reservations
Reserving zero bytes of memory is a valid operation and will return a BytesBuf
with zero or more bytes of capacity.
§Panics
May panic if the operating system runs out of memory.
Trait Implementations§
Source§impl HasMemory for Pending
impl HasMemory for Pending
Source§fn memory(&self) -> impl MemoryShared
fn memory(&self) -> impl MemoryShared
Source§impl Read for Pending
impl Read for Pending
Source§type Error = Infallible
type Error = Infallible
Source§async fn read_at_most_into(
&mut self,
len: usize,
into: BytesBuf,
) -> Result<(usize, BytesBuf), Infallible>
async fn read_at_most_into( &mut self, len: usize, into: BytesBuf, ) -> Result<(usize, BytesBuf), Infallible>
len bytes into the provided buffer. Read moreSource§async fn read_more_into(
&mut self,
into: BytesBuf,
) -> Result<(usize, BytesBuf), Infallible>
async fn read_more_into( &mut self, into: BytesBuf, ) -> Result<(usize, BytesBuf), Infallible>
Auto Trait Implementations§
impl Freeze for Pending
impl !RefUnwindSafe for Pending
impl Send for Pending
impl Sync for Pending
impl Unpin for Pending
impl !UnwindSafe for Pending
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
Source§impl<T> ReadExt for Twhere
T: Read,
impl<T> ReadExt for Twhere
T: Read,
Source§async fn read_at_most(&mut self, len: usize) -> Result<BytesView, Error>
async fn read_at_most(&mut self, len: usize) -> Result<BytesView, Error>
len bytes into a new buffer. Read moreSource§async fn read_exactly(&mut self, len: usize) -> Result<BytesView, Error>
async fn read_exactly(&mut self, len: usize) -> Result<BytesView, Error>
len bytes into a new buffer. Read moreSource§async fn read_at_most_while<F>(
&mut self,
len: usize,
inspect_fn: F,
) -> Result<(BytesView, BytesBuf), Error>
async fn read_at_most_while<F>( &mut self, len: usize, inspect_fn: F, ) -> Result<(BytesView, BytesBuf), Error>
len bytes into a new buffer. Read moreSource§async fn read_at_most_into_while<F>(
&mut self,
len: usize,
into: BytesBuf,
inspect_fn: F,
) -> Result<(BytesView, BytesBuf), Error>
async fn read_at_most_into_while<F>( &mut self, len: usize, into: BytesBuf, inspect_fn: F, ) -> Result<(BytesView, BytesBuf), Error>
len bytes into the provided buffer. Read moreSource§fn into_futures_stream(self) -> Pin<Box<ReadAsFuturesStream<T>>>
fn into_futures_stream(self) -> Pin<Box<ReadAsFuturesStream<T>>>
futures-stream only.