pub trait AsyncSkip {
// Required methods
fn poll_skip(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
amount: u64
) -> Poll<Result<(), Error>>;
fn poll_stream_position(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<u64, Error>>;
fn poll_stream_len(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<u64, Error>>;
}
Expand description
A subset of the [AsyncSeek
] trait, providing a cursor which can skip forward within a stream of bytes.
Required Methods§
sourcefn poll_skip(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
amount: u64
) -> Poll<Result<(), Error>>
fn poll_skip( self: Pin<&mut Self>, cx: &mut Context<'_>, amount: u64 ) -> Poll<Result<(), Error>>
Skip an amount of bytes in a stream.
A skip beyond the end of a stream is allowed, but behavior is defined by the implementation.