index.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `stream` mod in crate `futures`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, stream">
  9. <title>futures::stream - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
  14. <script src="../../storage.js"></script>
  15. </head>
  16. <body class="rustdoc mod">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Module stream</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>futures</a></p><script>window.sidebarCurrent = {name: 'stream', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>futures</a>::<wbr><a class="mod" href=''>stream</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../../src/futures/stream/mod.rs.html#1-1145' title='goto source code'>[src]</a></span></h1>
  50. <div class='docblock'><p>Asynchronous streams</p>
  51. <p>This module contains the <code>Stream</code> trait and a number of adaptors for this
  52. trait. This trait is very similar to the <code>Iterator</code> trait in the standard
  53. library except that it expresses the concept of blocking as well. A stream
  54. here is a sequential sequence of values which may take some amount of time
  55. in between to produce.</p>
  56. <p>A stream may request that it is blocked between values while the next value
  57. is calculated, and provides a way to get notified once the next value is
  58. ready as well.</p>
  59. <p>You can find more information/tutorials about streams <a href="https://tokio.rs/docs/getting-started/streams-and-sinks/">online at
  60. https://tokio.rs</a></p>
  61. </div><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
  62. <table><tr><td><code>pub use self::futures_unordered::<a class="struct" href="../../futures/stream/futures_unordered/struct.FuturesUnordered.html" title="struct futures::stream::futures_unordered::FuturesUnordered">FuturesUnordered</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
  63. <table>
  64. <tr class=' module-item'>
  65. <td><a class="mod" href="futures_unordered/index.html"
  66. title='mod futures::stream::futures_unordered'>futures_unordered</a></td>
  67. <td class='docblock-short'>
  68. <p>An unbounded set of futures.</p>
  69. </td>
  70. </tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
  71. <table>
  72. <tr class=' module-item'>
  73. <td><a class="struct" href="struct.AndThen.html"
  74. title='struct futures::stream::AndThen'>AndThen</a></td>
  75. <td class='docblock-short'>
  76. <p>A stream combinator which chains a computation onto values produced by a
  77. stream.</p>
  78. </td>
  79. </tr>
  80. <tr class=' module-item'>
  81. <td><a class="struct" href="struct.BufferUnordered.html"
  82. title='struct futures::stream::BufferUnordered'>BufferUnordered</a></td>
  83. <td class='docblock-short'>
  84. <p>An adaptor for a stream of futures to execute the futures concurrently, if
  85. possible, delivering results as they become available.</p>
  86. </td>
  87. </tr>
  88. <tr class=' module-item'>
  89. <td><a class="struct" href="struct.Buffered.html"
  90. title='struct futures::stream::Buffered'>Buffered</a></td>
  91. <td class='docblock-short'>
  92. <p>An adaptor for a stream of futures to execute the futures concurrently, if
  93. possible.</p>
  94. </td>
  95. </tr>
  96. <tr class=' module-item'>
  97. <td><a class="struct" href="struct.CatchUnwind.html"
  98. title='struct futures::stream::CatchUnwind'>CatchUnwind</a></td>
  99. <td class='docblock-short'>
  100. <p>Stream for the <code>catch_unwind</code> combinator.</p>
  101. </td>
  102. </tr>
  103. <tr class=' module-item'>
  104. <td><a class="struct" href="struct.Chain.html"
  105. title='struct futures::stream::Chain'>Chain</a></td>
  106. <td class='docblock-short'>
  107. <p>An adapter for chaining the output of two streams.</p>
  108. </td>
  109. </tr>
  110. <tr class=' module-item'>
  111. <td><a class="struct" href="struct.Chunks.html"
  112. title='struct futures::stream::Chunks'>Chunks</a></td>
  113. <td class='docblock-short'>
  114. <p>An adaptor that chunks up elements in a vector.</p>
  115. </td>
  116. </tr>
  117. <tr class=' module-item'>
  118. <td><a class="struct" href="struct.Collect.html"
  119. title='struct futures::stream::Collect'>Collect</a></td>
  120. <td class='docblock-short'>
  121. <p>A future which collects all of the values of a stream into a vector.</p>
  122. </td>
  123. </tr>
  124. <tr class=' module-item'>
  125. <td><a class="struct" href="struct.Concat.html"
  126. title='struct futures::stream::Concat'>Concat</a></td>
  127. <td class='docblock-short'>
  128. [<div class='stab deprecated'>Deprecated</div>] <p>A stream combinator to concatenate the results of a stream into the first
  129. yielded item.</p>
  130. </td>
  131. </tr>
  132. <tr class=' module-item'>
  133. <td><a class="struct" href="struct.Concat2.html"
  134. title='struct futures::stream::Concat2'>Concat2</a></td>
  135. <td class='docblock-short'>
  136. <p>A stream combinator to concatenate the results of a stream into the first
  137. yielded item.</p>
  138. </td>
  139. </tr>
  140. <tr class=' module-item'>
  141. <td><a class="struct" href="struct.Empty.html"
  142. title='struct futures::stream::Empty'>Empty</a></td>
  143. <td class='docblock-short'>
  144. <p>A stream which contains no elements.</p>
  145. </td>
  146. </tr>
  147. <tr class=' module-item'>
  148. <td><a class="struct" href="struct.Filter.html"
  149. title='struct futures::stream::Filter'>Filter</a></td>
  150. <td class='docblock-short'>
  151. <p>A stream combinator used to filter the results of a stream and only yield
  152. some values.</p>
  153. </td>
  154. </tr>
  155. <tr class=' module-item'>
  156. <td><a class="struct" href="struct.FilterMap.html"
  157. title='struct futures::stream::FilterMap'>FilterMap</a></td>
  158. <td class='docblock-short'>
  159. <p>A combinator used to filter the results of a stream and simultaneously map
  160. them to a different type.</p>
  161. </td>
  162. </tr>
  163. <tr class=' module-item'>
  164. <td><a class="struct" href="struct.Flatten.html"
  165. title='struct futures::stream::Flatten'>Flatten</a></td>
  166. <td class='docblock-short'>
  167. <p>A combinator used to flatten a stream-of-streams into one long stream of
  168. elements.</p>
  169. </td>
  170. </tr>
  171. <tr class=' module-item'>
  172. <td><a class="struct" href="struct.Fold.html"
  173. title='struct futures::stream::Fold'>Fold</a></td>
  174. <td class='docblock-short'>
  175. <p>A future used to collect all the results of a stream into one generic type.</p>
  176. </td>
  177. </tr>
  178. <tr class=' module-item'>
  179. <td><a class="struct" href="struct.ForEach.html"
  180. title='struct futures::stream::ForEach'>ForEach</a></td>
  181. <td class='docblock-short'>
  182. <p>A stream combinator which executes a unit closure over each item on a
  183. stream.</p>
  184. </td>
  185. </tr>
  186. <tr class=' module-item'>
  187. <td><a class="struct" href="struct.Forward.html"
  188. title='struct futures::stream::Forward'>Forward</a></td>
  189. <td class='docblock-short'>
  190. <p>Future for the <code>Stream::forward</code> combinator, which sends a stream of values
  191. to a sink and then waits until the sink has fully flushed those values.</p>
  192. </td>
  193. </tr>
  194. <tr class=' module-item'>
  195. <td><a class="struct" href="struct.FromErr.html"
  196. title='struct futures::stream::FromErr'>FromErr</a></td>
  197. <td class='docblock-short'>
  198. <p>A stream combinator to change the error type of a stream.</p>
  199. </td>
  200. </tr>
  201. <tr class=' module-item'>
  202. <td><a class="struct" href="struct.Fuse.html"
  203. title='struct futures::stream::Fuse'>Fuse</a></td>
  204. <td class='docblock-short'>
  205. <p>A stream which &quot;fuse&quot;s a stream once it's terminated.</p>
  206. </td>
  207. </tr>
  208. <tr class=' module-item'>
  209. <td><a class="struct" href="struct.FuturesOrdered.html"
  210. title='struct futures::stream::FuturesOrdered'>FuturesOrdered</a></td>
  211. <td class='docblock-short'>
  212. <p>An unbounded queue of futures.</p>
  213. </td>
  214. </tr>
  215. <tr class=' module-item'>
  216. <td><a class="struct" href="struct.Inspect.html"
  217. title='struct futures::stream::Inspect'>Inspect</a></td>
  218. <td class='docblock-short'>
  219. <p>Do something with the items of a stream, passing it on.</p>
  220. </td>
  221. </tr>
  222. <tr class=' module-item'>
  223. <td><a class="struct" href="struct.InspectErr.html"
  224. title='struct futures::stream::InspectErr'>InspectErr</a></td>
  225. <td class='docblock-short'>
  226. <p>Do something with the error of a stream, passing it on.</p>
  227. </td>
  228. </tr>
  229. <tr class=' module-item'>
  230. <td><a class="struct" href="struct.Iter.html"
  231. title='struct futures::stream::Iter'>Iter</a></td>
  232. <td class='docblock-short'>
  233. [<div class='stab deprecated'>Deprecated</div>] <p>A stream which is just a shim over an underlying instance of <code>Iterator</code>.</p>
  234. </td>
  235. </tr>
  236. <tr class=' module-item'>
  237. <td><a class="struct" href="struct.IterOk.html"
  238. title='struct futures::stream::IterOk'>IterOk</a></td>
  239. <td class='docblock-short'>
  240. <p>A stream which is just a shim over an underlying instance of <code>Iterator</code>.</p>
  241. </td>
  242. </tr>
  243. <tr class=' module-item'>
  244. <td><a class="struct" href="struct.IterResult.html"
  245. title='struct futures::stream::IterResult'>IterResult</a></td>
  246. <td class='docblock-short'>
  247. <p>A stream which is just a shim over an underlying instance of <code>Iterator</code>.</p>
  248. </td>
  249. </tr>
  250. <tr class=' module-item'>
  251. <td><a class="struct" href="struct.IterStream.html"
  252. title='struct futures::stream::IterStream'>IterStream</a></td>
  253. <td class='docblock-short'>
  254. [<div class='stab deprecated'>Deprecated</div>] <p>A stream which is just a shim over an underlying instance of <code>Iterator</code>.</p>
  255. </td>
  256. </tr>
  257. <tr class=' module-item'>
  258. <td><a class="struct" href="struct.Map.html"
  259. title='struct futures::stream::Map'>Map</a></td>
  260. <td class='docblock-short'>
  261. <p>A stream combinator which will change the type of a stream from one
  262. type to another.</p>
  263. </td>
  264. </tr>
  265. <tr class=' module-item'>
  266. <td><a class="struct" href="struct.MapErr.html"
  267. title='struct futures::stream::MapErr'>MapErr</a></td>
  268. <td class='docblock-short'>
  269. <p>A stream combinator which will change the error type of a stream from one
  270. type to another.</p>
  271. </td>
  272. </tr>
  273. <tr class=' module-item'>
  274. <td><a class="struct" href="struct.Merge.html"
  275. title='struct futures::stream::Merge'>Merge</a></td>
  276. <td class='docblock-short'>
  277. [<div class='stab deprecated'>Deprecated</div>] <p>An adapter for merging the output of two streams.</p>
  278. </td>
  279. </tr>
  280. <tr class=' module-item'>
  281. <td><a class="struct" href="struct.Once.html"
  282. title='struct futures::stream::Once'>Once</a></td>
  283. <td class='docblock-short'>
  284. <p>A stream which emits single element and then EOF.</p>
  285. </td>
  286. </tr>
  287. <tr class=' module-item'>
  288. <td><a class="struct" href="struct.OrElse.html"
  289. title='struct futures::stream::OrElse'>OrElse</a></td>
  290. <td class='docblock-short'>
  291. <p>A stream combinator which chains a computation onto errors produced by a
  292. stream.</p>
  293. </td>
  294. </tr>
  295. <tr class=' module-item'>
  296. <td><a class="struct" href="struct.Peekable.html"
  297. title='struct futures::stream::Peekable'>Peekable</a></td>
  298. <td class='docblock-short'>
  299. <p>A <code>Stream</code> that implements a <code>peek</code> method.</p>
  300. </td>
  301. </tr>
  302. <tr class=' module-item'>
  303. <td><a class="struct" href="struct.PollFn.html"
  304. title='struct futures::stream::PollFn'>PollFn</a></td>
  305. <td class='docblock-short'>
  306. <p>A stream which adapts a function returning <code>Poll</code>.</p>
  307. </td>
  308. </tr>
  309. <tr class=' module-item'>
  310. <td><a class="struct" href="struct.Repeat.html"
  311. title='struct futures::stream::Repeat'>Repeat</a></td>
  312. <td class='docblock-short'>
  313. <p>Stream that produces the same element repeatedly.</p>
  314. </td>
  315. </tr>
  316. <tr class=' module-item'>
  317. <td><a class="struct" href="struct.ReuniteError.html"
  318. title='struct futures::stream::ReuniteError'>ReuniteError</a></td>
  319. <td class='docblock-short'>
  320. <p>Error indicating a <code>SplitSink&lt;S&gt;</code> and <code>SplitStream&lt;S&gt;</code> were not two halves
  321. of a <code>Stream + Split</code>, and thus could not be <code>reunite</code>d.</p>
  322. </td>
  323. </tr>
  324. <tr class=' module-item'>
  325. <td><a class="struct" href="struct.Select.html"
  326. title='struct futures::stream::Select'>Select</a></td>
  327. <td class='docblock-short'>
  328. <p>An adapter for merging the output of two streams.</p>
  329. </td>
  330. </tr>
  331. <tr class=' module-item'>
  332. <td><a class="struct" href="struct.Skip.html"
  333. title='struct futures::stream::Skip'>Skip</a></td>
  334. <td class='docblock-short'>
  335. <p>A stream combinator which skips a number of elements before continuing.</p>
  336. </td>
  337. </tr>
  338. <tr class=' module-item'>
  339. <td><a class="struct" href="struct.SkipWhile.html"
  340. title='struct futures::stream::SkipWhile'>SkipWhile</a></td>
  341. <td class='docblock-short'>
  342. <p>A stream combinator which skips elements of a stream while a predicate
  343. holds.</p>
  344. </td>
  345. </tr>
  346. <tr class=' module-item'>
  347. <td><a class="struct" href="struct.SplitSink.html"
  348. title='struct futures::stream::SplitSink'>SplitSink</a></td>
  349. <td class='docblock-short'>
  350. <p>A <code>Sink</code> part of the split pair</p>
  351. </td>
  352. </tr>
  353. <tr class=' module-item'>
  354. <td><a class="struct" href="struct.SplitStream.html"
  355. title='struct futures::stream::SplitStream'>SplitStream</a></td>
  356. <td class='docblock-short'>
  357. <p>A <code>Stream</code> part of the split pair</p>
  358. </td>
  359. </tr>
  360. <tr class=' module-item'>
  361. <td><a class="struct" href="struct.StreamFuture.html"
  362. title='struct futures::stream::StreamFuture'>StreamFuture</a></td>
  363. <td class='docblock-short'>
  364. <p>A combinator used to temporarily convert a stream into a future.</p>
  365. </td>
  366. </tr>
  367. <tr class=' module-item'>
  368. <td><a class="struct" href="struct.Take.html"
  369. title='struct futures::stream::Take'>Take</a></td>
  370. <td class='docblock-short'>
  371. <p>A stream combinator which returns a maximum number of elements.</p>
  372. </td>
  373. </tr>
  374. <tr class=' module-item'>
  375. <td><a class="struct" href="struct.TakeWhile.html"
  376. title='struct futures::stream::TakeWhile'>TakeWhile</a></td>
  377. <td class='docblock-short'>
  378. <p>A stream combinator which takes elements from a stream while a predicate
  379. holds.</p>
  380. </td>
  381. </tr>
  382. <tr class=' module-item'>
  383. <td><a class="struct" href="struct.Then.html"
  384. title='struct futures::stream::Then'>Then</a></td>
  385. <td class='docblock-short'>
  386. <p>A stream combinator which chains a computation onto each item produced by a
  387. stream.</p>
  388. </td>
  389. </tr>
  390. <tr class=' module-item'>
  391. <td><a class="struct" href="struct.Unfold.html"
  392. title='struct futures::stream::Unfold'>Unfold</a></td>
  393. <td class='docblock-short'>
  394. <p>A stream which creates futures, polls them and return their result</p>
  395. </td>
  396. </tr>
  397. <tr class=' module-item'>
  398. <td><a class="struct" href="struct.Wait.html"
  399. title='struct futures::stream::Wait'>Wait</a></td>
  400. <td class='docblock-short'>
  401. <p>A stream combinator which converts an asynchronous stream to a <strong>blocking
  402. iterator</strong>.</p>
  403. </td>
  404. </tr>
  405. <tr class=' module-item'>
  406. <td><a class="struct" href="struct.Zip.html"
  407. title='struct futures::stream::Zip'>Zip</a></td>
  408. <td class='docblock-short'>
  409. <p>An adapter for merging the output of two streams.</p>
  410. </td>
  411. </tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
  412. <table>
  413. <tr class=' module-item'>
  414. <td><a class="enum" href="enum.MergedItem.html"
  415. title='enum futures::stream::MergedItem'>MergedItem</a></td>
  416. <td class='docblock-short'>
  417. [<div class='stab deprecated'>Deprecated</div>] <p>An item returned from a merge stream, which represents an item from one or
  418. both of the underlying streams.</p>
  419. </td>
  420. </tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
  421. <table>
  422. <tr class=' module-item'>
  423. <td><a class="trait" href="trait.Stream.html"
  424. title='trait futures::stream::Stream'>Stream</a></td>
  425. <td class='docblock-short'>
  426. <p>A stream of values, not all of which may have been produced yet.</p>
  427. </td>
  428. </tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
  429. <table>
  430. <tr class=' module-item'>
  431. <td><a class="fn" href="fn.empty.html"
  432. title='fn futures::stream::empty'>empty</a></td>
  433. <td class='docblock-short'>
  434. <p>Creates a stream which contains no elements.</p>
  435. </td>
  436. </tr>
  437. <tr class=' module-item'>
  438. <td><a class="fn" href="fn.futures_ordered.html"
  439. title='fn futures::stream::futures_ordered'>futures_ordered</a></td>
  440. <td class='docblock-short'>
  441. <p>Converts a list of futures into a <code>Stream</code> of results from the futures.</p>
  442. </td>
  443. </tr>
  444. <tr class=' module-item'>
  445. <td><a class="fn" href="fn.futures_unordered.html"
  446. title='fn futures::stream::futures_unordered'>futures_unordered</a></td>
  447. <td class='docblock-short'>
  448. <p>Converts a list of futures into a <code>Stream</code> of results from the futures.</p>
  449. </td>
  450. </tr>
  451. <tr class=' module-item'>
  452. <td><a class="fn" href="fn.iter.html"
  453. title='fn futures::stream::iter'>iter</a></td>
  454. <td class='docblock-short'>
  455. [<div class='stab deprecated'>Deprecated</div>] <p>Converts an <code>Iterator</code> over <code>Result</code>s into a <code>Stream</code> which is always ready
  456. to yield the next value.</p>
  457. </td>
  458. </tr>
  459. <tr class=' module-item'>
  460. <td><a class="fn" href="fn.iter_ok.html"
  461. title='fn futures::stream::iter_ok'>iter_ok</a></td>
  462. <td class='docblock-short'>
  463. <p>Converts an <code>Iterator</code> into a <code>Stream</code> which is always ready
  464. to yield the next value.</p>
  465. </td>
  466. </tr>
  467. <tr class=' module-item'>
  468. <td><a class="fn" href="fn.iter_result.html"
  469. title='fn futures::stream::iter_result'>iter_result</a></td>
  470. <td class='docblock-short'>
  471. <p>Converts an <code>Iterator</code> over <code>Result</code>s into a <code>Stream</code> which is always ready
  472. to yield the next value.</p>
  473. </td>
  474. </tr>
  475. <tr class=' module-item'>
  476. <td><a class="fn" href="fn.once.html"
  477. title='fn futures::stream::once'>once</a></td>
  478. <td class='docblock-short'>
  479. <p>Creates a stream of single element</p>
  480. </td>
  481. </tr>
  482. <tr class=' module-item'>
  483. <td><a class="fn" href="fn.poll_fn.html"
  484. title='fn futures::stream::poll_fn'>poll_fn</a></td>
  485. <td class='docblock-short'>
  486. <p>Creates a new stream wrapping around a function returning <code>Poll</code>.</p>
  487. </td>
  488. </tr>
  489. <tr class=' module-item'>
  490. <td><a class="fn" href="fn.repeat.html"
  491. title='fn futures::stream::repeat'>repeat</a></td>
  492. <td class='docblock-short'>
  493. <p>Create a stream which produces the same item repeatedly.</p>
  494. </td>
  495. </tr>
  496. <tr class=' module-item'>
  497. <td><a class="fn" href="fn.unfold.html"
  498. title='fn futures::stream::unfold'>unfold</a></td>
  499. <td class='docblock-short'>
  500. <p>Creates a <code>Stream</code> from a seed and a closure returning a <code>Future</code>.</p>
  501. </td>
  502. </tr></table></section>
  503. <section id='search' class="content hidden"></section>
  504. <section class="footer"></section>
  505. <aside id="help" class="hidden">
  506. <div>
  507. <h1 class="hidden">Help</h1>
  508. <div class="shortcuts">
  509. <h2>Keyboard Shortcuts</h2>
  510. <dl>
  511. <dt><kbd>?</kbd></dt>
  512. <dd>Show this help dialog</dd>
  513. <dt><kbd>S</kbd></dt>
  514. <dd>Focus the search field</dd>
  515. <dt><kbd>↑</kbd></dt>
  516. <dd>Move up in search results</dd>
  517. <dt><kbd>↓</kbd></dt>
  518. <dd>Move down in search results</dd>
  519. <dt><kbd>↹</kbd></dt>
  520. <dd>Switch tab</dd>
  521. <dt><kbd>&#9166;</kbd></dt>
  522. <dd>Go to active search result</dd>
  523. <dt><kbd>+</kbd></dt>
  524. <dd>Expand all sections</dd>
  525. <dt><kbd>-</kbd></dt>
  526. <dd>Collapse all sections</dd>
  527. </dl>
  528. </div>
  529. <div class="infos">
  530. <h2>Search Tricks</h2>
  531. <p>
  532. Prefix searches with a type followed by a colon (e.g.
  533. <code>fn:</code>) to restrict the search to a given type.
  534. </p>
  535. <p>
  536. Accepted types are: <code>fn</code>, <code>mod</code>,
  537. <code>struct</code>, <code>enum</code>,
  538. <code>trait</code>, <code>type</code>, <code>macro</code>,
  539. and <code>const</code>.
  540. </p>
  541. <p>
  542. Search functions by type signature (e.g.
  543. <code>vec -> usize</code> or <code>* -> vec</code>)
  544. </p>
  545. </div>
  546. </div>
  547. </aside>
  548. <script>
  549. window.rootPath = "../../";
  550. window.currentCrate = "futures";
  551. </script>
  552. <script src="../../main.js"></script>
  553. <script defer src="../../search-index.js"></script>
  554. </body>
  555. </html>