[−][src]Trait futures_util::io::AsyncSeek
Seek bytes asynchronously.
This trait is analogous to the std::io::Seek
trait, but integrates
with the asynchronous task system. In particular, the poll_seek
method, unlike Seek::seek
, will automatically queue the current task
for wakeup and return if data is not yet available, rather than blocking
the calling thread.
Required methods
Implementations on Foreign Types
impl<P> AsyncSeek for Pin<P> where
P: DerefMut + Unpin,
<P as Deref>::Target: AsyncSeek,
[src][−]
P: DerefMut + Unpin,
<P as Deref>::Target: AsyncSeek,
fn poll_seek(
self: Pin<&mut Pin<P>>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
[src]
self: Pin<&mut Pin<P>>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
impl<T> AsyncSeek for Cursor<T> where
T: Unpin + AsRef<[u8]>,
[src][−]
T: Unpin + AsRef<[u8]>,
fn poll_seek(
self: Pin<&mut Cursor<T>>,
&mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
[src]
self: Pin<&mut Cursor<T>>,
&mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
impl<T> AsyncSeek for Box<T> where
T: AsyncSeek + Unpin + ?Sized,
[src][−]
T: AsyncSeek + Unpin + ?Sized,
fn poll_seek(
self: Pin<&mut Box<T>>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
[src]
self: Pin<&mut Box<T>>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
impl<'_, T> AsyncSeek for &'_ mut T where
T: AsyncSeek + Unpin + ?Sized,
[src][−]
T: AsyncSeek + Unpin + ?Sized,
fn poll_seek(
self: Pin<&mut &'_ mut T>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>
[src]
self: Pin<&mut &'_ mut T>,
cx: &mut Context,
pos: SeekFrom
) -> Poll<Result<u64, Error>>