mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
42 lines
27 KiB
HTML
42 lines
27 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `AsyncSeek` trait in crate `futures`."><meta name="keywords" content="rust, rustlang, rust-lang, AsyncSeek"><title>futures::prelude::AsyncSeek - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../futures/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait AsyncSeek</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.poll_seek">poll_seek</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-AsyncSeek-for-%26%27_%20mut%20T">&'_ mut T</a><a href="#impl-AsyncSeek-for-Box%3CT%2C%20Global%3E">Box<T, Global></a><a href="#impl-AsyncSeek-for-Pin%3CP%3E">Pin<P></a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">futures</a>::<wbr><a href="index.html">prelude</a></p><div id="sidebar-vars" data-name="AsyncSeek" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">futures</a>::<wbr><a href="index.html">prelude</a>::<wbr><a class="trait" href="">AsyncSeek</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/futures_io/lib.rs.html#235-257" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait AsyncSeek {
|
||
pub fn <a href="#tymethod.poll_seek" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br> ) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>>;
|
||
}</pre></div><div class="docblock"><p>Seek bytes asynchronously.</p>
|
||
<p>This trait is analogous to the <code>std::io::Seek</code> trait, but integrates
|
||
with the asynchronous task system. In particular, the <code>poll_seek</code>
|
||
method, unlike <code>Seek::seek</code>, will automatically queue the current task
|
||
for wakeup and return if data is not yet available, rather than blocking
|
||
the calling thread.</p>
|
||
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.poll_seek" class="method"><code>pub fn <a href="#tymethod.poll_seek" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_io/lib.rs.html#255-256" title="goto source code">[src]</a></h3><div class="docblock"><p>Attempt to seek to an offset, in bytes, in a stream.</p>
|
||
<p>A seek beyond the end of a stream is allowed, but behavior is defined
|
||
by the implementation.</p>
|
||
<p>If the seek operation completed successfully,
|
||
this method returns the new position from the start of the stream.
|
||
That position can be used later with <a href="../../futures/io/enum.SeekFrom.html#variant.Start" title="SeekFrom::Start"><code>SeekFrom::Start</code></a>.</p>
|
||
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
|
||
<p>Seeking to a negative offset is considered an error.</p>
|
||
<h1 id="implementation" class="section-header"><a href="#implementation">Implementation</a></h1>
|
||
<p>This function may not return errors of kind <code>WouldBlock</code> or
|
||
<code>Interrupted</code>. Implementations must convert <code>WouldBlock</code> into
|
||
<code>Poll::Pending</code> and either internally retry or convert
|
||
<code>Interrupted</code> into another error kind.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><h3 id="impl-AsyncSeek-for-Box%3CT%2C%20Global%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>> <span class="where fmt-newline">where<br> T: <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-AsyncSeek-for-Box%3CT%2C%20Global%3E" class="anchor"></a><a class="srclink" href="../../src/futures_io/lib.rs.html#489-491" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek" class="method hidden"><code>pub fn <a href="#method.poll_seek" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_io/lib.rs.html#490" title="goto source code">[src]</a></h4></div><h3 id="impl-AsyncSeek-for-Pin%3CP%3E" class="impl"><code class="in-band">impl<P> <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> <P as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a>: <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a>, </span></code><a href="#impl-AsyncSeek-for-Pin%3CP%3E" class="anchor"></a><a class="srclink" href="../../src/futures_io/lib.rs.html#497-507" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-1" class="method hidden"><code>pub fn <a href="#method.poll_seek" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><P>>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_io/lib.rs.html#502-503" title="goto source code">[src]</a></h4></div><h3 id="impl-AsyncSeek-for-%26%27_%20mut%20T" class="impl"><code class="in-band">impl<'_, T> <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'_ mut </a>T <span class="where fmt-newline">where<br> T: <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-AsyncSeek-for-%26%27_%20mut%20T" class="anchor"></a><a class="srclink" href="../../src/futures_io/lib.rs.html#493-495" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-2" class="method hidden"><code>pub fn <a href="#method.poll_seek" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'_ mut </a>T>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_io/lib.rs.html#494" title="goto source code">[src]</a></h4></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-AsyncSeek" class="impl"><code class="in-band">impl<A, B> AsyncSeek for <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a><A, B> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a>,<br> A: <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a>, </span></code><a href="#impl-AsyncSeek" class="anchor"></a><a class="srclink" href="../../src/futures_util/future/either.rs.html#254-269" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-3" class="method hidden"><code>pub fn <a href="#method.poll_seek-3" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="enum" href="../../futures/future/enum.Either.html" title="enum futures::future::Either">Either</a><A, B>>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_util/future/either.rs.html#259-263" title="goto source code">[src]</a></h4></div><h3 id="impl-AsyncSeek-1" class="impl"><code class="in-band">impl<R> AsyncSeek for <a class="struct" href="../../futures/io/struct.BufReader.html" title="struct futures::io::BufReader">BufReader</a><R> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../futures/io/trait.AsyncRead.html" title="trait futures::io::AsyncRead">AsyncRead</a> + <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a>, </span></code><a href="#impl-AsyncSeek-1" class="anchor"></a><a class="srclink" href="../../src/futures_util/io/buf_reader.rs.html#162-209" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-4" class="method"><code>pub fn <a href="#method.poll_seek-4" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures/io/struct.BufReader.html" title="struct futures::io::BufReader">BufReader</a><R>>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_util/io/buf_reader.rs.html#181-185" title="goto source code">[src]</a></h4><div class="docblock"><p>Seek to an offset, in bytes, in the underlying reader.</p>
|
||
<p>The position used for seeking with <code>SeekFrom::Current(_)</code> is the
|
||
position the underlying reader would be at if the <code>BufReader</code> had no
|
||
internal buffer.</p>
|
||
<p>Seeking always discards the internal buffer, even if the seek position
|
||
would otherwise fall within it. This guarantees that calling
|
||
<code>.into_inner()</code> immediately after a seek yields the underlying reader
|
||
at the same position.</p>
|
||
<p>See <a href="../../futures/io/trait.AsyncSeek.html"><code>AsyncSeek</code></a> for more details.</p>
|
||
<p>Note: In the edge case where you're seeking with <code>SeekFrom::Current(n)</code>
|
||
where <code>n</code> minus the internal buffer length overflows an <code>i64</code>, two
|
||
seeks will be performed instead of one. If the second seek returns
|
||
<code>Err</code>, the underlying reader will be left at the same position it would
|
||
have if you called <code>seek</code> with <code>SeekFrom::Current(0)</code>.</p>
|
||
</div></div><h3 id="impl-AsyncSeek-2" class="impl"><code class="in-band">impl<T> AsyncSeek for <a class="struct" href="../../futures/io/struct.AllowStdIo.html" title="struct futures::io::AllowStdIo">AllowStdIo</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Seek.html" title="trait std::io::Seek">Seek</a>, </span></code><a href="#impl-AsyncSeek-2" class="anchor"></a><a class="srclink" href="../../src/futures_util/io/allow_std.rs.html#151-157" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-5" class="method hidden"><code>pub fn <a href="#method.poll_seek-5" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures/io/struct.AllowStdIo.html" title="struct futures::io::AllowStdIo">AllowStdIo</a><T>>, <br> &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_util/io/allow_std.rs.html#152-153" title="goto source code">[src]</a></h4></div><h3 id="impl-AsyncSeek-3" class="impl"><code class="in-band">impl<T> AsyncSeek for <a class="struct" href="../../futures/io/struct.Cursor.html" title="struct futures::io::Cursor">Cursor</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></code><a href="#impl-AsyncSeek-3" class="anchor"></a><a class="srclink" href="../../src/futures_util/io/cursor.rs.html#150-161" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-6" class="method hidden"><code>pub fn <a href="#method.poll_seek-6" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures/io/struct.Cursor.html" title="struct futures::io::Cursor">Cursor</a><T>>, <br> &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_util/io/cursor.rs.html#154-158" title="goto source code">[src]</a></h4></div><h3 id="impl-AsyncSeek-4" class="impl"><code class="in-band">impl<W> AsyncSeek for <a class="struct" href="../../futures/io/struct.BufWriter.html" title="struct futures::io::BufWriter">BufWriter</a><W> <span class="where fmt-newline">where<br> W: <a class="trait" href="../../futures/io/trait.AsyncWrite.html" title="trait futures::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="../../futures/io/trait.AsyncSeek.html" title="trait futures::io::AsyncSeek">AsyncSeek</a>, </span></code><a href="#impl-AsyncSeek-4" class="anchor"></a><a class="srclink" href="../../src/futures_util/io/buf_writer.rs.html#153-165" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.poll_seek-7" class="method"><code>pub fn <a href="#method.poll_seek-7" class="fnname">poll_seek</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="../../futures/io/struct.BufWriter.html" title="struct futures::io::BufWriter">BufWriter</a><W>>, <br> cx: &mut <a class="struct" href="../../futures/task/struct.Context.html" title="struct futures::task::Context">Context</a><'_>, <br> pos: <a class="enum" href="../../futures/io/enum.SeekFrom.html" title="enum futures::io::SeekFrom">SeekFrom</a><br>) -> <a class="enum" href="../../futures/task/enum.Poll.html" title="enum futures::task::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../../futures/io/struct.Error.html" title="struct futures::io::Error">Error</a>>></code><a class="srclink" href="../../src/futures_util/io/buf_writer.rs.html#157-161" title="goto source code">[src]</a></h4><div class="docblock"><p>Seek to the offset, in bytes, in the underlying writer.</p>
|
||
<p>Seeking always writes out the internal buffer before seeking.</p>
|
||
</div></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/futures_io/if_std/trait.AsyncSeek.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="futures"></div>
|
||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |